修改密码

admin2年前Laravel876

public function setpass()
{
   $mobile = request()->input('mobile');
   $code = request()->input('code');
   $pwd = request()->input('pwd', 1);
   $rpwd = request()->input('rpwd', 1);
   if (empty($pwd)) {
       return $this->error('请输入密码');
   }
   if (empty($rpwd)) {
       return $this->error('请输入确认密码');
   }
   if ($pwd !== $rpwd) {
       return $this->error('两次密码不一致');
   }
   $this->verfiy($mobile, $code);
   $info = Db::table('member')->where(array('id' => $this->user_id))->update(['pwd' => md5($this->md5 . $pwd)]);
   if ($info !== false) {
       return $this->success('修改成功');
   } else {
       return $this->error('修改失败');
   }
}

相关文章

发送公众号信息

* 发送消息 */public function tosend($openid, $title, $content, $time, $aid){    $tokens = $thi...

腾讯云发送短信

<?phpnamespace App\Http\Controllers;use Illuminate\Http\Request;use Illuminate\Support\Facades\DB...

用户注册账号

public function register(){    $mobile = request()->input('mobile');   &nb...

百度浏览器中视频悬浮

  <video class="html5-video"                poster=...

公众号登录

public function wxlogin(){       $code = request()->input('code'); &n...

批量处理数据

   public function index44()    {        $domain = request(...