Skip to content

Commit

Permalink
fix #429
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed Mar 28, 2016
1 parent 7bf954e commit 82e929c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ public function loginHandle($request, $response, $args)
$user = User::where('email', '=', $email)->first();

if ($user == null) {
$rs['ret'] = 0;
$rs['msg'] = "401 邮箱或者密码错误";
$res['ret'] = 0;
$res['msg'] = "401 邮箱或者密码错误";
return $this->echoJson($response, $res);
}

if (!Hash::checkPassword($user->pass, $passwd)) {
$rs['ret'] = 0;
$rs['msg'] = "402 邮箱或者密码错误";
$res['ret'] = 0;
$res['msg'] = "402 邮箱或者密码错误";
return $this->echoJson($response, $res);
}
// @todo
Expand All @@ -48,8 +48,8 @@ public function loginHandle($request, $response, $args)
$time = 3600 * 24 * 7;
}
Auth::login($user->id, $time);
$rs['ret'] = 1;
$rs['msg'] = "欢迎回来";
$res['ret'] = 1;
$res['msg'] = "欢迎回来";
return $this->echoJson($response, $res);
}

Expand Down
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// BASE_PATH
define('BASE_PATH', __DIR__);
define('VERSION', '3.3.5');
define('VERSION', '3.3.6');

// Vendor Autoload
require BASE_PATH . '/vendor/autoload.php';
Expand Down

0 comments on commit 82e929c

Please sign in to comment.