Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }