public function register(stdClass $data) { $this->_profile = Application_Model_User_Profile::create(); $this->_profile->setEmail($data->email); $this->_setBaseData($data); $this->_setPasswords($data); $this->_profile->save(); $this->_login($data->password); $this->_sendEmail(); return $this->_profile; }
protected function _createProfile() { $profile = Application_Model_User_Profile::create(); $profile->setEmail($this->getUserEmail()); $profile->setName($this->getUserName()); $profile->setLastname($this->getUserLastname()); $profile->save(); $profile->setAvatar($this->_createAvatar($profile, $this->getPhotoPath())); $profile->save(); $this->setProfile($profile); $this->activate(); $this->save(); return $profile; }