コード例 #1
0
 public function doAuthentication($request)
 {
     $objUsersDO = new UsersDO();
     $objUsersDO->setUsername($request['username']);
     $objUsersDO->setPassword($this->hashPassword($request['password'], $request['username']));
     $objUsersDAOFactory = UsersDAOFactory::getInstance()->createDAO();
     if ($username = $objUsersDAOFactory->doAuthentication($objUsersDO)) {
         $connection = Crypto::encrypt(implode("|Z|1|Z|", array($username, time())), _Key_New);
         $this->setAuthenticated($connection);
         return true;
     } else {
         return false;
     }
 }