修复bug
This commit is contained in:
@@ -22,7 +22,7 @@ class Auth extends Api {
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
$user = model('User')->feild('uid,username,password,salt')->where('username', $this->request->post('username'))->find();
|
||||
$user = model('User')->field('uid,username,password,salt')->where('username', $this->request->post('username'))->find();
|
||||
if ($user['password'] === md5($this->request->post('password').$user['salt'])) {
|
||||
$this->data['code'] = 1;
|
||||
$user['access_token'] = authcode($user['uid'].'|'.$user['username'].'|'.$user['password'], 'ENCODE');
|
||||
|
||||
@@ -12,6 +12,8 @@ use app\common\controller\Api;
|
||||
|
||||
class User extends Api {
|
||||
|
||||
public $mustToken = true;
|
||||
|
||||
public function getuser(){
|
||||
$this->data['code'] = 1;
|
||||
$this->data['data'] = db('Member')->where('uid', $this->request->param('uid'))->find();
|
||||
|
||||
Reference in New Issue
Block a user