application/index/controller/UserIndex.php
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace app\index\controller;
//use think\Controller;
use app\index\model\UserSpace;
class UserIndex extends UserBase {
public function index() {
if (request()->param('uid')) {
$UserSpace = UserSpace::get(['uid' => request()->param('uid')]);
} else {
$UserSpace = UserSpace::get(['uid' => session('uid', '', 'index')]);
}
if ($UserSpace['pic']) {
$arr_pic = explode(",", $UserSpace['pic']);
}
$this->assign('arr_pic', $arr_pic);
$this->assign('UserSpace', $UserSpace);
return $this->fetch();
}
public function add_user_tel() {
$tel= request()->param('tel');
$code= request()->param('code');
$is_tel= $this->check_is_tel($tel);
$check_tel= check_num_equal(session('tel_number', '', 'index'),$tel);
$check_code= check_num_equal(session('rand_num', "", 'index'),$code);
if($is_tel){ return $this->fetch('ajax/tip_url', ['info'=>'该手机号码已存在','url'=>'index']); die;}
if(!$check_code){ return $this->fetch('ajax/tip_url', ['info'=>'验证码错误','url'=>'index']); die;}
if(!$check_tel){ return $this->fetch('ajax/tip_url', ['info'=>'手机号码错误','url'=>'index']); die;}
if($check_tel && $check_code){
$user = UserSpace::get(['uid' => request()->param('uid')]);
$user->tel = request()->param('tel');
$user->update_time = time();
if ($user->save()) {
$this->redirect('UserIndex/index');
}
}
}
//判断邮箱合法性,然后发送邮箱链接
public function add_user_email() {
$email= request()->param('email');
$uid= request()->param('uid');
$is_email= $this->check_is_email($email);
if($is_email){ return $this->fetch('ajax/tip_url', ['info'=>'该邮箱已存在','url'=>'index']); die;}
$this->send_email_pin($email,$uid);
return $this->fetch('send_email', ['uid'=>$uid,'email'=>$email] );
}
//给用户添加邮箱
后面还有 182 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。