getControlState('user'); } public function setUserToChange(DbUser $user) { if ($user->IsGuest) { throw new TInvalidDataValueException( 'Password change impossible for guest user' ); } $this->setControlState('user', $user); } public function checkPassword($sender, $param) { $param->IsValid = DbUser::verifyPassword( $this->Password->Text, $this->UserToChange->getPassword() ); } public function changePassword($sender, $param) { $this->SuccessMessage->Visible = FALSE; if ($this->Page->IsValid) { $this->UserToChange->changePassword( $this->NewPassword->Text ); $this->SuccessMessage->Visible = TRUE; } } } ?>