浏览代码

后台修改密码bug修复

xiaogang 3 年之前
父节点
当前提交
ca6887f655
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 3 0
      app/Http/Controllers/Api/AuthorizationsController.php
  2. 2 0
      app/Models/User.php

+ 3 - 0
app/Http/Controllers/Api/AuthorizationsController.php

@@ -345,6 +345,9 @@ class AuthorizationsController extends Controller
         } catch (SmsException $e) {
         } catch (SmsException $e) {
             return $this->response->errorForbidden($e->getMessage());
             return $this->response->errorForbidden($e->getMessage());
         }
         }
+
+
+
         return response()->json($res);
         return response()->json($res);
 
 
     }
     }

+ 2 - 0
app/Models/User.php

@@ -54,6 +54,8 @@ class User extends Authenticatable implements JWTSubject
     {
     {
         file_put_contents('password.log','----'.date('Y-m-d H:i:s').'----'.var_export($value,true).PHP_EOL,FILE_APPEND);
         file_put_contents('password.log','----'.date('Y-m-d H:i:s').'----'.var_export($value,true).PHP_EOL,FILE_APPEND);
         $this->attributes['password'] = bcrypt($value);
         $this->attributes['password'] = bcrypt($value);
+
+        file_put_contents('password.log','----'.date('Y-m-d H:i:s').'--加密后--'.var_export($value,true).PHP_EOL,FILE_APPEND);
     }
     }
 
 
     public function user_info()
     public function user_info()