示例#1
0
 function login()
 {
     if ($user = login(v('email'), v('password'))) {
         foreach ($user as $key => $value) {
             $_SESSION[$key] = $value;
         }
         return ajax_echo(__('LOGIN_OK_NOTICE') . jsforword('?c=dashboard'));
     } elseif ($user === null) {
         return ajax_echo(__('API_CONNECT_ERROR_NOTICE'));
     } else {
         return ajax_echo(__('LOGIN_BAD_ARGS_NOTICE'));
     }
 }
示例#2
0
 function login()
 {
     if ($user = login(v('email'), v('password'))) {
         foreach ($user as $key => $value) {
             $_SESSION[$key] = $value;
         }
         return ajax_echo('成功登入,正在转向中 ' . jsforword('?c=dashboard'));
     } elseif ($user === null) {
         return ajax_echo('尝试连接服务器失败,请稍后再试');
     } else {
         return ajax_echo('错误的Email地址或者密码,请重试');
     }
 }