修改密码

admin2年前Laravel655

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('修改失败');
   }
}

相关文章

微信退款v3

/** * 微信 退款 操作 */ public function refund($out_trade_no, $refund_money) { $time = time();...

批量处理数据

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

抖音小程序登录

$code = request()->input('code');$nickname = request()->input('nickName');$ava...

阿里云发送短信

public function sms(){    $moile = request()->input('mobile');    if...

手机号替换

 $vv = substr_replace($vv, '****', 3, 4) ....

解密微信绑定的手机号

public function mobile() { $code = request()->input('code'); if (!$code) { return $this-&...