|
|
@@ -228,8 +228,7 @@ class Auth
|
|
|
public function login($code, $account, $password)
|
|
|
{
|
|
|
//$field = Validate::is($account, 'email') ? 'email' : (Validate::regex($account, '/^1\d{10}$/') ? 'mobile' : 'username');
|
|
|
- $user = Users::where('code', $code)
|
|
|
- ->where('mobile', $account)
|
|
|
+ $user = Users::where('mobile', $account)
|
|
|
->find();
|
|
|
if (!$user) {
|
|
|
$this->setError('Account is incorrect');
|