/** * Test whether a given plain text password matches a given User's encoded password. * * @param User $user * @param string $password * @return bool */ public function checkUserPassword(AUser $user, $password) { return $user->getPassword() === $this->encodeUserPassword($user, $password); }