function onSetPassword(Am_Event_SetPassword $event) { $user = $event->getUser(); $found = $this->getTable()->findByAmember($user); if ($found && $this->canUpdate($found)) { $this->_table->updatePassword($found, $event->getSaved($this->getPasswordFormat())); $user->data()->set(self::USER_NEED_SETPASS, null)->update(); } }