|
|
|
@ -138,19 +138,24 @@ class TestWhiteListController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$user = M('user','tab_')->where($userData)->find();
|
|
|
|
|
|
|
|
|
|
if ($user) {
|
|
|
|
|
$this->error('账号已经存在');
|
|
|
|
|
if (!$user) {
|
|
|
|
|
$this->error('账号不存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
|
|
|
|
|
$userData['promote_id'] = 0;
|
|
|
|
|
$userData['promote_account'] = '官方渠道';
|
|
|
|
|
$userData['register_time'] = time();
|
|
|
|
|
$userData['check_status'] = $data['status']?$data['status']:0;
|
|
|
|
|
// $userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
|
|
|
|
|
// $userData['promote_id'] = 0;
|
|
|
|
|
// $userData['promote_account'] = '官方渠道';
|
|
|
|
|
// $userData['register_time'] = time();
|
|
|
|
|
// $userData['check_status'] = $data['status']?$data['status']:0;
|
|
|
|
|
//
|
|
|
|
|
// $userAdd = M('user','tab_')->add($userData);
|
|
|
|
|
// if ($userAdd) {
|
|
|
|
|
// dump($user);die();
|
|
|
|
|
|
|
|
|
|
$userAdd = M('user','tab_')->add($userData);
|
|
|
|
|
if ($userAdd) {
|
|
|
|
|
$data['user_id'] = $userAdd;
|
|
|
|
|
$userWhite = M('test_white_list','tab_')->where(['user_id'=>$user['id']])->find();
|
|
|
|
|
|
|
|
|
|
if (!$userWhite) {
|
|
|
|
|
$data['user_id'] = $user['id'];
|
|
|
|
|
$data['show_status'] = $data['status']?$data['status']:0;
|
|
|
|
|
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
|
|
|
|
|
$data['create_ime'] = time();
|
|
|
|
@ -161,11 +166,16 @@ class TestWhiteListController extends ThinkController
|
|
|
|
|
} else {
|
|
|
|
|
$this->error('添加白名单失败');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$this->error('添加用户失败');
|
|
|
|
|
$this->error('白名单以添加,请勿重复添加');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// $this->error('添加用户失败');
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function freezeSupport() {
|
|
|
|
|