/** * Create Opus_Person object for currently logged user. If no account * has been found, return NULL. * * @return Opus_Person */ public function createPerson() { if (is_null($this->_account)) { return; } $person = new Opus_Person(); $person->setFirstName(trim($this->_account->getFirstName())); $person->setLastName(trim($this->_account->getLastName())); $person->setEmail(trim($this->_account->getEmail())); if (!$person->isValid()) { $this->_log->err("Created Opus_Person object for user '" . $this->_login . "' is NOT VALID. "); } return $person; }