/** * Checks the user's credentials. * * @param User $user The user to authenticate. * * @return boolean True in case, the user is allowed to login, false otherwise. * * @author Christian Achatz * @version * Version 0.1, 17.05.2009<br /> */ public function validateCredentials(User $user) { $authCrit = new GenericCriterionObject(); $authCrit->addPropertyIndicator('Username', $user->getUsername()); $authCrit->addPropertyIndicator('Password', md5($user->getPassword())); $gbUser = $this->orm->loadObjectByCriterion('User', $authCrit); return $gbUser !== null; }