Exemplo n.º 1
0
 private function validatePassword()
 {
     $username = Http::getPOST('username');
     $password = md5(Http::getPOST('password'));
     $user = new User();
     if (!$user->validatePassword($username, $password)) {
         Http::redirect(GAPP_PASSWORD_VERIFY_FAILED);
     }
 }
Exemplo n.º 2
0
 function afterForInsert($insert_id)
 {
     Http::redirect('index.php?c=circulate&a=list');
 }
Exemplo n.º 3
0
 function afterForInsert($insert_id)
 {
     Http::redirect('index.php?c=equipment&a=list');
 }
Exemplo n.º 4
0
 function execute()
 {
     unset($_SESSION['_USER_INFO']);
     Http::redirect('index.php');
 }
Exemplo n.º 5
0
 /**
  * 验证token
  * @param $tokenCode
  * 验证完成后重置session中的值(防止重复提交)
  */
 function verifyToken($tokenCode)
 {
     if ($_SESSION['_token'] !== $tokenCode) {
         Http::redirect(GAPP_TOKEN_VERIFY_FAILED);
     }
     $_SESSION['_token'] = '';
 }