public function update(Application_Model_User_Profile $profile, stdClass $data) { $this->_profile = $profile; $this->_uploadAvatar($data->idAvatar); $this->_setBaseData($data); $this->_profile->setPhone($data->userPhone); $this->_profile->setAddress($data->address); if (!empty($data->password)) { $this->_setPasswords($data); } $this->_profile->save(); }