|
@@ -73,15 +73,15 @@ class User extends Api
|
|
|
{
|
|
|
$mobile = $this->request->post('mobile');
|
|
|
$captcha = $this->request->post('captcha');
|
|
|
- if (!$mobile || !$captcha) {
|
|
|
- $this->error(__('Invalid parameters'));
|
|
|
- }
|
|
|
+// if (!$mobile || !$captcha) {
|
|
|
+// $this->error(__('Invalid parameters'));
|
|
|
+// }
|
|
|
if (!Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('Mobile is incorrect'));
|
|
|
}
|
|
|
- if (!Sms::check($mobile, $captcha, 'mobilelogin')) {
|
|
|
- $this->error(__('Captcha is incorrect'));
|
|
|
- }
|
|
|
+// if (!Sms::check($mobile, $captcha, 'mobilelogin')) {
|
|
|
+// $this->error(__('Captcha is incorrect'));
|
|
|
+// }
|
|
|
$user = \app\common\model\User::getByMobile($mobile);
|
|
|
if ($user) {
|
|
|
if ($user->status != 'normal') {
|
|
@@ -172,6 +172,8 @@ class User extends Api
|
|
|
$company = $this->request->post('company');
|
|
|
$company_site = $this->request->post('company_site');
|
|
|
$avatar = $this->request->post('avatar', '', 'trim,strip_tags,htmlspecialchars');
|
|
|
+ print_r(base64_decode($avatar));
|
|
|
+ exit();
|
|
|
if ($username) {
|
|
|
$exists = \app\common\model\User::where('username', $username)->where('id', '<>', $this->auth->id)->find();
|
|
|
if ($exists) {
|