...
|
...
|
@@ -62,6 +62,11 @@ class Login extends BaseApi |
|
|
'userinfo' => $this->auth->getUserinfo(),
|
|
|
'thirdinfo' => $result,
|
|
|
];
|
|
|
if ($this->auth->avatar != '' && !in_array(substr($this->auth->avatar,-4),explode(',','jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx'))){
|
|
|
$content = file_get_contents($this->auth->avatar);
|
|
|
file_put_contents(ROOT_PATH.'/public/uploads/user_avatar/user_id_'.$this->auth->id.'.jpg', $content);
|
|
|
model('user')->where('id',$this->auth->id)->update(['avatar'=>'/uploads/user_avatar/user_id_'.$this->auth->id.'.jpg']);
|
|
|
}
|
|
|
$this->success(__('Logged in successful'), $data);
|
|
|
}
|
|
|
}
|
...
|
...
|
|