public function serialize()
    {
        $serialized = new \stdClass();
        $serialized->username = $this->_login;
        $serialized->commonname = trim($this->_firstname . ' ' . $this->_lastname);

        return json_encode($serialized);
    }
public function serialize()
    {
        $serialized = new \stdClass();
        $serialized->username = $this->_login;
        $serialized->commonname = trim($this->_firstname . ' ' . $this->_lastname);

        return json_encode($serialized);
    }
public function serialize ( ) { $ serialized = new \ stdClass ( ) ; $ serialized -> username = $ this -> _login ; $ serialized -> commonname = trim ( $ this -> _firstname . ' ' . $ this -> _lastname ) ; return json_encode ( $ serialized ) ; }
Serialize the user object.

@return Json_object
Serialize the user object .