• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uc_user_checkname函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uc_user_checkname函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_user_checkname函数的具体用法?PHP uc_user_checkname怎么用?PHP uc_user_checkname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了uc_user_checkname函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: checkUsername

 public function checkUsername($username)
 {
     $this->initDiscuzApi();
     if (UC_CHARSET == 'gbk') {
         $username = iconv('UTF-8', 'gb2312', $username);
     }
     $result = uc_user_checkname($username);
     return $this->convertApiResult($result);
 }
开发者ID:fujianguo,项目名称:EduSoho,代码行数:9,代码来源:DiscuzAuthProvider.php


示例2: CheckUsernameValid

 /**
  * Check whether the given username is legal(not in the forbidden list).
  * @param $username: a username
  * @return true if the username is legal; false otherwise.
  * */
 public function CheckUsernameValid($username)
 {
     /* uc_user_checkname is defined as a global function */
     $result = uc_user_checkname($username);
     if ($result > 0) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:superwmh,项目名称:discuz-friendconnect,代码行数:15,代码来源:discuz.class.php


示例3: checkUcenterName

 public function checkUcenterName($attribute, $params)
 {
     //ucenter
     Yii::import('ext.ucenter.MUcenter', true);
     $flag = uc_user_checkname($this->name);
     switch ($flag) {
         case -1:
             $this->addError('name', Yii::t('app', '用户名不合法'));
             break;
         case -2:
             $this->addError('name', Yii::t('app', '包含不允许注册的词语'));
             break;
         case -3:
             $this->addError('name', Yii::t('app', '用户名已经存在'));
             break;
     }
 }
开发者ID:stan5621,项目名称:eduwind,代码行数:17,代码来源:RegisterForm.php


示例4: checkUserExit

	/**
	 * 检测会员是否存在
	 * @author Vimhui Develop Team
	 * @param  $username 会员名
	 * @return bool
	 */
	public function checkUserExit($username,$isreturn=false) {
		$ucresult = uc_user_checkname($username);
		if($isreturn === true) return $ucresult;
		if ($ucresult == 1){
			return true;
		}
		if($ucresult == -1) {
			$this->uc_error = 'profile_username_illegal';
			return false;
		} elseif($ucresult == -2) {
			$this->uc_error = 'profile_username_protect';
			return false;
		} elseif($ucresult == -3) {
			$this->uc_error = 'register_check_found';
			return false;
		}
	}
开发者ID:noikiy,项目名称:ejia,代码行数:23,代码来源:ucenter.model.php


示例5: ajax_check_name

    function ajax_check_name()
    {
        $this->uid != NULL && exit('Acess Denied!');
        $this->toclose();
        $register = M('user');
        if ($register->where(array('name' => $this->post['name']))->count() != 0) {
            exit('重新注册<script>$("#tip_mid").html("该用户名已被使用!");
						$("#tip").css({left:$("#reg_name").offset().left+100,top:$("#reg_name").offset().top-46});
						swing("register_div");</script>	');
        } else {
            if ($register->where(array('email' => $this->post['email']))->count() != 0) {
                exit('重新注册<script>$("#tip_mid").html("该邮箱已被使用!");
						$("#tip").css({left:$("#reg_email").offset().left+100,top:$("#reg_email").offset().top-46});
						swing("register_div");</script>');
            } else {
                if ($this->setting['is_invite_register'] == 1 && ($register->where(array('invitecode' => $this->post['invite_val']))->count() == 0 || $register->where(array('invitecode' => $this->post['invite_val']))->getField('invitecount') < 1)) {
                    exit('重新注册<script>$("#tip_mid").html("该邀请码已失效!");
						$("#tip").css({left:$("#invite_code_input").offset().left+100,top:$("#invite_code_input").offset().top-46});
						swing("register_div");</script>');
                } else {
                    if ($this->setting['register_code'] == 1 && md5($this->post['code']) != $_SESSION['verify']) {
                        exit('重新注册<script>$("#tip_mid").html("验证码输入错误!");
						$("#tip").css({left:$("#reg_code").offset().left+100,top:$("#reg_code").offset().top-46});
						swing("register_div");</script>');
                    } else {
                        if ($this->setting['ucenter_on'] == 1) {
                            if (uc_user_checkemail($this->post['email'] != 1)) {
                                exit('重新注册<script>$("#tip_mid").html("UC:该邮箱不能注册!");
						$("#tip").css({left:$("#reg_email").offset().left+100,top:$("#reg_email").offset().top-46});
						swing("register_div");</script>');
                            } else {
                                if (uc_user_checkname($this->post['name'] != 1)) {
                                    exit('重新注册<script>$("#tip_mid").html("UC:该用户名不能注册!");
						$("#tip").css({left:$("#reg_email").offset().left+100,top:$("#reg_email").offset().top-46});
						swing("register_div");</script>');
                                }
                            }
                        }
                        echo '正在注册...<script>document.register_form.submit();</script>';
                    }
                }
            }
        }
    }
开发者ID:kerneltravel,项目名称:QuoraCms,代码行数:44,代码来源:AccountAction.class.php


示例6: check_uname

 public function check_uname($uname)
 {
     $ret = uc_user_checkname($this->iconv($uname));
     if ($ret > 0) {
         return $uname;
     } else {
         if ($ret == -1) {
             $this->err->add('用户名不合法', 281);
         } else {
             if ($ret == -2) {
                 $this->err->add('包含要不允许注册的词语', 282);
             } else {
                 if ($ret == -3) {
                     $this->err->add('用户名已经存在', 283);
                 }
             }
         }
     }
     return false;
 }
开发者ID:a195474368,项目名称:ejiawang,代码行数:20,代码来源:ucenter.mdl.php


示例7: doregister

 function doregister()
 {
     $rules = array(array('password', 'require', '密码不能为空!', 1), array('user_realname', 'require', '用户名不能为空!', 1), array('repassword', 'require', '重复密码不能为空!', 1), array('repassword', 'password', '确认密码不正确', 0, 'confirm'));
     if (I('post.reg_type') == 1) {
         if (!sp_check_verify_code()) {
             $this->error("验证码错误!");
         }
         $_POST['email'] = I('post.username');
         array_unshift($rules, array('username', 'require', '邮箱不能为空!', 1), array('email', 'email', '邮箱格式不正确!', 1));
     } else {
         array_unshift($rules, array('username', 'require', '手机号码不能为空!', 1));
         $user_phone = I('post.username');
         if (!preg_match('/^[1][3458]{1}[0-9]{9}$/', $user_phone)) {
             $this->error('手机号码格式有误');
         }
         //手机号码格式检测
         $check = M('Sms')->field('code,add_time')->where(array('phone' => $user_phone))->order('id desc')->find();
         if (empty($_POST['code'])) {
             $this->error('验证码不能为空');
         }
         if (strtolower($check['code']) != strtolower(I('post.code'))) {
             $this->error("手机验证码错误");
         }
         if (time() > $check['add_time'] + 3600) {
             $this->error('验证码已过期,请重新获取');
         }
     }
     $users_model = M("Member");
     if ($users_model->validate($rules)->create() === false) {
         $this->error($users_model->getError());
     }
     extract($_POST);
     //用户名需过滤的字符的正则
     /**$stripChar = '?<*.>\'"';
       	if(preg_match('/['.$stripChar.']/is', $username)==1){
       		$this->error('用户名中包含'.$stripChar.'等非法字符!');
       	}
       	**/
     $banned_usernames = explode(",", sp_get_cmf_settings("banned_usernames"));
     if (in_array($username, $banned_usernames)) {
         $this->error("此用户名禁止使用!");
     }
     if (strlen($password) < 6 || strlen($password) > 20) {
         $this->error("密码长度至少6位,最多20位!");
     }
     $where['user_login'] = $username;
     $where['user_email'] = $email;
     //    	$where['user_realname']=$user_realname;
     $where['_logic'] = 'OR';
     $ucenter_syn = C("UCENTER_ENABLED");
     $uc_checkemail = 1;
     $uc_checkusername = 1;
     if ($ucenter_syn) {
         include UC_CLIENT_ROOT . "client.php";
         $uc_checkemail = uc_user_checkemail($email);
         $uc_checkusername = uc_user_checkname($username);
     }
     $users_model = M("Member");
     $result = $users_model->where($where)->count();
     if ($result || $uc_checkemail < 0 || $uc_checkusername < 0) {
         $this->error("用户名或者该邮箱已经存在!");
     } else {
         $uc_register = true;
         if ($ucenter_syn) {
             $uc_uid = uc_user_register($username, $password, $email);
             //exit($uc_uid);
             if ($uc_uid < 0) {
                 $uc_register = false;
             }
         }
         if ($uc_register) {
             $need_email_active = C("SP_MEMBER_EMAIL_ACTIVE");
             if ($need_email_active) {
                 //配置为需要邮件激活时
                 if (I('post.reg_type') == 1) {
                     //邮箱注册
                     $need_email_active = true;
                 } else {
                     if (I('post.reg_type') == 2) {
                         //手机号码注册
                         $need_email_active = false;
                     }
                 }
             }
             $data = array('user_login' => $username, 'user_email' => $email, 'user_nicename' => $username, 'user_realname' => $user_realname, 'user_pass' => sp_password($password), 'last_login_ip' => get_client_ip(), 'create_time' => date("Y-m-d H:i:s"), 'last_login_time' => date("Y-m-d H:i:s"), 'user_status' => $need_email_active ? 2 : 1, "utype" => 0, 'user_phone' => $user_phone);
             $rst = $users_model->add($data);
             if ($rst) {
                 //登入成功页面跳转
                 $data['id'] = $rst;
                 //插入我的账户
                 $account = M("Account");
                 $ac['uid'] = $rst;
                 $ac['money'] = get_point_rule('register');
                 $account->add($ac);
                 $_SESSION['user'] = $data;
                 //发送激活邮件
                 if ($need_email_active) {
                     $this->_send_to_active();
                     unset($_SESSION['user']);
                     $this->success("注册成功,激活后才能使用!", U("user/login/index"));
//.........这里部分代码省略.........
开发者ID:kmlzh1983,项目名称:diamond,代码行数:101,代码来源:RegisterController.class.php


示例8: verify_member_name

 /**
  * 验证会员名
  * Enter description here ...
  * @param unknown_type $member_name
  */
 function verify_member_name($member_name, $member_id = 0, $identifier = 0, $type, $isUc = 1)
 {
     $member_name = addslashes(trim(stripslashes($member_name)));
     $ret = $this->member_name_auth($member_name);
     if ($ret < 0 && $type == 'm2o') {
         return $ret;
         //-4 超出最大长度 -5 低于最小长度 -6 含有 % @ < > * 特殊符号
     } else {
         if ($this->member_name_exists($member_name, $member_id, $identifier)) {
             return -7;
             //用户名存在
         } elseif ($this->settings['ucenter']['open'] && $isUc && !$identifier) {
             include_once CUR_CONF_PATH . 'uc_client/client.php';
             return uc_user_checkname($member_name);
         }
     }
     return 1;
 }
开发者ID:h3len,项目名称:Project,代码行数:23,代码来源:member.class.php


示例9: exit

        } else {
            exit("err");
        }
    } else {
        exit("err");
    }
} elseif ($act == 'check_usname') {
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $usname = trim($_POST['usname']);
    if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
        $usname = utf8_to_gbk($usname);
    }
    $user = get_user_inusername($usname);
    if (defined('UC_API')) {
        include_once QISHI_ROOT_PATH . 'uc_client/client.php';
        if (uc_user_checkname($usname) === 1 && empty($user)) {
            exit("true");
        } else {
            exit("false");
        }
    }
    empty($user) ? exit("true") : exit("false");
} elseif ($act == 'check_email') {
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $email = trim($_POST['email']);
    if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
        $email = utf8_to_gbk($email);
    }
    $user = get_user_inemail($email);
    if (defined('UC_API')) {
        include_once QISHI_ROOT_PATH . 'uc_client/client.php';
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:ajax_user.php


示例10: ajax_username

 public function ajax_username()
 {
     $username = isset($_GET['username']) && trim($_GET['username']) ? trim($_GET['username']) : exit('0');
     if (CHARSET != 'utf-8') {
         $username = iconv('utf-8', CHARSET, $username);
         $username = addslashes($username);
     }
     if ($this->db->get_one(array('username' => $username))) {
         exit('0');
     } else {
         //UCenter部分
         if ($this->config['ucuse']) {
             pc_base::load_config('uc_config');
             include PHPCMS_PATH . 'api/uc_client/client.php';
             $rs = uc_user_checkname($username);
             if ($rs < 1) {
                 exit('0');
             }
         }
         exit('1');
     }
 }
开发者ID:boylzj,项目名称:omguitar,代码行数:22,代码来源:member.php


示例11: ShowMsg

     $cfg_ml->DelCache($mid);
     ShowMsg('操作成功,请重新登录系统!', 'login.php');
     exit;
 } else {
     if ($fmdo == 'user') {
         //检查用户名是否存在
         if ($dopost == "checkuser") {
             AjaxHead();
             $msg = '';
             $uid = trim($uid);
             if ($cktype == 0) {
                 $msgtitle = '用户笔名';
             } else {
                 #api{{
                 if (defined('UC_API') && @(include_once DEDEROOT . '/uc_client/client.php')) {
                     $ucresult = uc_user_checkname($uid);
                     if ($ucresult > 0) {
                         echo "<font color='#4E7504'><b>√用户名可用</b></font>";
                     } elseif ($ucresult == -1) {
                         echo "<font color='red'><b>×用户名不合法</b></font>";
                     } elseif ($ucresult == -2) {
                         echo "<font color='red'><b>×包含要允许注册的词语</b></font>";
                     } elseif ($ucresult == -3) {
                         echo "<font color='red'><b>×用户名已经存在</b></font>";
                     }
                     exit;
                 }
                 #/aip}}
                 $msgtitle = '用户名';
             }
             if ($cktype != 0 || $cfg_mb_wnameone == 'N') {
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:index_do.php


示例12: dsetcookie

        dsetcookie('con_auth_hash');
        connect_error_output('qqconnect:connect_login_first');
    }
    $conuin = $connect_guest['conuin'];
    $conuinsecret = $connect_guest['conuinsecret'];
    if ($conuin && $conuinsecret && $conopenid) {
        try {
            $connectOAuthClient = Cloud::loadClass('Service_Client_ConnectOAuth');
            $connect_user_info = $connectOAuthClient->connectGetUserInfo($conopenid, $conuin, $conuinsecret);
        } catch (Exception $e) {
            connect_error_output();
        }
        if ($connect_user_info['nickname']) {
            $qq_nick = $connect_user_info['nickname'];
            $connect_nickname = $connectService->connectFilterUsername($qq_nick);
        }
        loaducenter();
        $ucresult = uc_user_checkname($connect_nickname);
        $first_available_username = '';
        if ($ucresult >= 0) {
            $first_available_username = $connect_nickname;
        }
        echo $first_available_username;
    }
}
include template('common/footer');
function connect_error_output($error = '')
{
    include template('common/footer');
    exit;
}
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:connect_user.php


示例13: CheckUsername

	function CheckUsername()
	{
		$username=trim($this->Post['username'] ? $this->Post['username'] : $this->Post['check_value']);

		if (strlen($username) < 3 || strlen($username) > 15) {
			response_text(__("用户名长度请控制在3~15"));
		}
		if (($filter_msg = filter($username))) {
			response_text("用户名 ".$filter_msg);
		}
		if (preg_match('~[\~\`\!\@\#\$\%\^\&\*\(\)\=\+\[\{\]\}\;\:\'\"\,\<\.\>\/\?]~',$username)) {
			response_text(__("用户名不能包含特殊字符"));
		}
		$censoruser = ConfigHandler::get('user','forbid');
		$censoruser .= "topic
login
member
profile
tag
get_password
report
weather
master
url";

		$censorexp = '/^('.str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($censoruser = trim($censoruser)), '/')).')$/i';
		if($censoruser && @preg_match($censorexp, $username)) {
			response_text(sprintf(__("用户名<b>%s</b>被保留,禁止注册"), $username));
		}

		$response= "对不起,您输入的用户名 <B>{$username}</B> 不能注册或已经被他人使用,请选择其他名字后再试。";

		$this->DatabaseHandler->SetTable(TABLE_PREFIX. 'system_members');
		$is_exists=$this->DatabaseHandler->Select('',"username='{$username}'");

		if($is_exists) {
			response_text($response);
		}

		if(true === UCENTER)
		{
			include_once(UC_CLIENT_ROOT . './client.php');
			$uc_result = uc_user_checkname($username);

			if($uc_result < 0) {
				response_text($response);
			}
		}
		exit ;
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:50,代码来源:member.mod.php


示例14: user_checkname

 static function user_checkname($username)
 {
     global $kekezu;
     if ($kekezu->_sys_config['user_intergration'] == 1) {
         $member_obj = new Keke_witkey_member_class();
         $member_obj->setWhere('username="' . $username . '"');
         $res = $member_obj->count_keke_witkey_member();
         $res = $res ? 0 : 1;
     } elseif ($kekezu->_sys_config['user_intergration'] == 2) {
         require_once S_ROOT . '/uc_client/client.php';
         $res = uc_user_checkname($username);
     }
     return $res;
 }
开发者ID:xupnge1314,项目名称:project,代码行数:14,代码来源:keke_user_class.php


示例15: checkName

 static function checkName($username)
 {
     $checkname = uc_user_checkname();
     if ($checkname > 0) {
         return TRUE;
     } else {
         self::$lastAction = 'checkname';
         self::$lastErrorCode = $checkname;
         return FALSE;
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:11,代码来源:UcApi.php


示例16: ucLogin

 /**
  * uc登陆或者注册。返回数组
  * $result['user'] 用户信息。用于ts系统使用
  * $result['login'] 同步登陆是否成功
  * @param unknown_type $username
  * @param unknown_type $password
  */
 public function ucLogin($username, $password)
 {
     if (isValidEmail($username)) {
         $user = service('Passport')->getLocalUser($username, $password);
         if (UC_SYNC && $user['uid']) {
             $uc_user_ref = ts_get_ucenter_user_ref($user['uid']);
             if ($uc_user_ref['uc_uid']) {
                 $uc_user = uc_user_login($uc_user_ref['uc_uid'], $password, 1);
                 if ($uc_user[0] == -1 || $uc_user[0] == -2) {
                     $uc_user_ref = array();
                 }
             } else {
                 if ($user['uname']) {
                     $res_checkname = uc_user_checkname($user['uname']);
                     if ($res_checkname >= -3 && $res_checkname <= -1) {
                         $error_param = L('username');
                     }
                     $res_checkemail = uc_user_checkemail($username);
                     if ($res_checkemail >= -6 && $res_checkemail <= -4) {
                         $error_param = $error_param ? $error_param . L('and_email') : 'Email';
                     }
                     if ($error_param) {
                         $message_data['title'] = L('sync_ucenter') . $error_param . L('sign_in_failed');
                         $message_data['content'] = L('you_of_site') . $error_param . L('ucenter_sign_in_failed') . $error_param . L('ucenter_clash') . U('home/Account/security') . L('ucenter_reset') . $error_param . '。';
                         $message_data['to'] = $user['uid'];
                         model('Message')->postMessage($message_data, M('user')->getField('uid', 'admin_level=1'));
                     } else {
                         $uc_uid = uc_user_register($user['uname'], $password, $username);
                         ts_add_ucenter_user_ref($user['uid'], $uc_uid, $user['uname']);
                         $uc_user[0] = $uc_uid;
                     }
                 }
             }
         }
     } else {
         if (UC_SYNC) {
             $uc_user = uc_user_login($username, $password);
             if ($uc_user[0] > 0) {
                 $uc_user_ref = ts_get_ucenter_user_ref('', $uc_user[0]);
                 if (!$uc_user_ref) {
                     // 注册
                     if ($this->isValidEmail($uc_user['3']) && $this->isEmailAvailable($uc_user['3'])) {
                         $user['email'] = $uc_user['3'];
                     } else {
                         $message_data['title'] = L('ucenter_sync_email_clash');
                         $message_data['content'] = L('ucenter_email_used') . U('home/Account/bind') . L('ucenter_reset_email');
                     }
                     if (isLegalUsername($uc_user['1']) && !M('user')->where("uname='{$uc_user['1']}'")->count()) {
                         $user['uname'] = $uc_user['1'];
                     }
                     $user['password'] = md5($uc_user['2']);
                     $user['ctime'] = time();
                     $user['is_active'] = 1;
                     $user['uid'] = M('user')->add($user);
                     if ($user['uid']) {
                         $reg_from_ucenter = 1;
                         ts_add_ucenter_user_ref($user['uid'], $uc_user['0'], $uc_user['1']);
                         // 将用户添加到myop_userlog,以使漫游应用能获取到用户信息
                         $userlog = array('uid' => $user['uid'], 'action' => 'add', 'type' => '0', 'dateline' => time());
                         M('myop_userlog')->add($userlog);
                         if (isset($message_data) && !empty($message_data)) {
                             $message_data['to'] = $user['uid'];
                             model('Message')->postMessage($message_data, M('user')->getField('uid', 'admin_level=1'));
                         }
                         //关联操作
                         //$this->registerRelation($user['uid']);
                     } else {
                         $user = array();
                     }
                 } else {
                     if ($username != $uc_user_ref['uc_username']) {
                         ts_update_ucenter_user_ref('', $uc_user_ref['uc_uid'], $username);
                     }
                     $user = M('user')->where("uid={$uc_user_ref['uid']}")->find();
                     if (md5($password) != $user['password']) {
                         M('user')->where("uid={$uc_user_ref['uid']}")->setField('password', md5($password));
                     }
                 }
             }
         } else {
             $uc_user_ref = ts_get_ucenter_user_ref('', '', $username);
             if ($uc_user_ref['uid']) {
                 $user = service('Passport')->getLocalUser($uc_user_ref['uid'], $password);
             }
         }
     }
     $result['login'] = '';
     if ($user) {
         $result['login'] = UC_SYNC && $uc_user[0] ? uc_user_synlogin($uc_user[0]) : '';
     }
     $result['user'] = $user;
     $result['reg_from_ucenter'] = $reg_from_ucenter;
     return $result;
//.........这里部分代码省略.........
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:101,代码来源:PassportService.class.php


示例17: checkname

 function checkname(&$msg, $username, $type)
 {
     $uid = uc_user_checkname($username);
     if ($uid <= 0) {
         if ($uid == -1) {
             $msg = "用户名不合法";
         } elseif ($uid == -2 || $uid == -3) {
             if ($type > 0) {
                 $msg = $uid == -3 ? "用户名已经存在" : "包含不允许注册的词语";
             } elseif ($type == 0) {
                 $msg = "OK";
             }
         }
     } else {
         if ($type > 0) {
             $msg = "OK";
         } elseif ($type == 0) {
             $msg = "用户名不存在";
         }
     }
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:21,代码来源:ucenter.class.php


示例18: show_message

     show_message('login_succeed', $url);
 }
 if (check_submit($_POST['registsubmit'], $_POST['formhash'])) {
     $cyask_user = trim($_POST['username']);
     $cyask_user = strtolower($cyask_user);
     $password = trim($_POST['password']);
     $email = $_POST['email'];
     $username_ok = filters_username($cyask_user);
     if (!$username_ok) {
         show_message('regist_name_error', '');
     }
     $email_ok = uc_user_checkemail($email);
     if (!$email_ok) {
         show_message('regist_email_error' . abs($email_ok), '');
     }
     $usernum = uc_user_checkname($cyask_user);
     if ($usernum != 1) {
         show_message('regist_name_used', '');
     } else {
         $password = trim($_POST['password']);
         $cyask_uid = uc_user_register($cyask_user, $password, $email);
         if ($cyask_uid > 0) {
             $dblink->query("INSERT INTO {$dbprefix}members(uid,username,email,adminid,groupid) VALUES('{$cyask_uid}','{$cyask_user}','{$email}','5','0')");
             list($cyask_uid, $username, $passwd, $email) = uc_user_login($cyask_user, $password);
             uc_dsetcookie('auth', uc_authcode($cyask_uid . "\t" . $username . "\t" . $email, 'ENCODE'), 86400 * 365);
             $syninfo = uc_user_synlogin($cyask_uid);
             show_message('regist_succeed', $url);
         } else {
             show_message('regist_error', '');
         }
     }
开发者ID:yunsite,项目名称:cyaskuc,代码行数:31,代码来源:register.php


示例19: registration_errors

 function registration_errors($errors, $user_login, $user_email)
 {
     if (uc_user_checkname($user_login) < 0) {
         $errors->add('username_exists', __('<strong>ERROR</strong>: This username is already registered, please choose another one.', 'ucenter'));
     }
     if (uc_user_checkemail($user_email) < 0) {
         $errors->add('email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.', 'ucenter'));
     }
     return $errors;
 }
开发者ID:hotmob,项目名称:likedome,代码行数:10,代码来源:ucenter.php


示例20: uc_user_register

function uc_user_register($username, $password, $email, $nickname, $questionid = '', $answer = '', $regip = '', $addorg = 1)
{
    if ($nickname && ($status = uc_user_checkname($nickname)) < 0) {
        return $status;
    }
    if (($status = uc_user_checkusername($username)) < 0) {
        return $status;
    }
    if (($status = uc_user_checkemail($email)) < 0) {
        return $status;
    }
    $uid = uc_add_user($username, $password, $email, $nickname, 0, $questionid, $answer, $regip);
    //加入默认机构
    if ($addorg && is_array($uid) && getglobal('setting/defaultdepartment') && DB::fetch_first("select orgid from %t where orgid=%d ", array('organization', getglobal('setting/defaultdepartment')))) {
        C::t('organization_user')->insert($uid['uid'], getglobal('setting/defaultdepartment'));
    }
    return $uid;
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:18,代码来源:function_user.php



注:本文中的uc_user_checkname函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uc_user_delete函数代码示例发布时间:2022-05-23
下一篇:
PHP uc_user_checkemail函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap