当前位置: 首页>>代码示例>>PHP>>正文


PHP uc_user_checkemail函数代码示例

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


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

示例1: checkEmail

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

示例2: checkUcenterEmail

 public function checkUcenterEmail($attribute, $params)
 {
     //ucenter
     Yii::import('ext.ucenter.MUcenter', true);
     $flag = uc_user_checkemail($this->email);
     switch ($flag) {
         case -4:
             $this->addError('email', 'Email 格式有误');
             break;
         case -5:
             $this->addError('email', 'Email 不允许注册');
             break;
         case -6:
             $this->addError('email', '该 Email 已经被注册');
             break;
     }
 }
开发者ID:stan5621,项目名称:eduwind,代码行数:17,代码来源:RegisterForm.php

示例3: 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

示例4: 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

示例5: user_checkemail

 /**
  * 检查 Email 地址
  * @param type $email 邮箱地址
  * @return int 1:成功
  *                      -4:Email 格式有误
  *                      -5:Email 不允许注册
  *                      -6:该 Email 已经被注册
  */
 public function user_checkemail($email)
 {
     if (strlen($email) > 6 && preg_match("/^[\\w\\-\\.]+@[\\w\\-\\.]+(\\.\\w+)+\$/", $email)) {
         if ($this->UCenter) {
             return uc_user_checkemail($email);
         } else {
             $find = M("Member")->where(array("email" => $email))->find();
             if ($find) {
                 return -6;
             }
             return 1;
         }
     }
     return -4;
 }
开发者ID:BGCX262,项目名称:ztoa-svn-to-git,代码行数:23,代码来源:PassportService.class.php

示例6: king_ajax_register

function king_ajax_register()
{
    global $king;
    if ($king->config('isregister', 'user') == 0) {
        kc_ajax($king->lang->get('user/title/regstop'), $king->config('registertip', 'user'), 0, '', 500, 200);
    }
    if (!kc_post('is')) {
        $s = $king->config('reglicense', 'user');
        $but = kc_htm_a($king->lang->get('portal/user/iaccept'), '{URL:\'' . $king->config('inst') . 'user/index.php\',CMD:\'register\',METHOD:\'GET\',is:1,IS:1}');
        $but .= "<a href=\"javascript:;\" class=\"k_close\">" . $king->lang->get('system/common/cancel') . "</a>";
        $height = 400;
        $title = $king->lang->get('portal/title/reglicense');
        $GLOBALS['ischeck'] = false;
    } else {
        /*
        if($GLOBALS['ismethod']){//POST过程
        	$data=$_POST;
        }
        */
        $data = kc_data(array('username', 'userpass', 'usermail'));
        if ($king->config('blackuser', 'user')) {
            $array_black = explode('|', $king->config('blackuser', 'user'));
            $array_black = array_diff($array_black, array(null));
        } else {
            $array_black = array();
        }
        //username
        $_array = array(array('username', 0, 3, 15), array('username', 14, $king->lang->get('portal/check/reg/u-1'), array('*', '\\', ':', '?', '<', '>', '|', ';', ',', '\'', '!', '~', '$', '#', '@', '^', '(', ')', '{', '}', '=', '+', '%', '/')), array('username', 14, $king->lang->get('portal/check/reg/u-2'), $array_black), array('username', 12, $king->lang->get('portal/check/reg/u-3'), $king->db->getRows_one("select userid from %s_user where username='" . $king->db->escape(kc_post('username')) . "';")));
        if ($king->user->isuc && $GLOBALS['ismethod']) {
            //有提交操作的时候才做验证
            $ucheck = uc_user_checkname(kc_post('username'));
            $_array[] = array('username', 12, $king->lang->get('system/check/reg/u' . $ucheck), $ucheck != 1);
        }
        $s = $king->htmForm($king->lang->get('portal/user/name') . ' (3-15)', '<input class="k_in w150" type="text" name="username" value="' . htmlspecialchars(kc_post('username')) . '" maxlength="15" />', $_array);
        //pass
        $_array = array(array('userpass', 0, 6, 30), array('userpass', 17, null, 'userpass1'));
        $s .= $king->htmForm($king->lang->get('portal/user/pass') . ' (6-30)', '<input class="k_in w150" type="password" name="userpass" maxlength="30" />', $_array);
        //repass
        $s .= $king->htmForm($king->lang->get('portal/user/pass1'), '<input class="k_in w150" type="password" name="userpass1" maxlength="30" />');
        //mail
        $_array = array(array('usermail', 0, 6, 32), array('usermail', 5, $king->lang->get('portal/check/reg/u-4')), array('usermail', 14, $king->lang->get('portal/check/reg/u-2'), $array_black), array('usermail', 12, $king->lang->get('portal/check/reg/u-6'), $king->db->getRows_one("select userid from %s_user where usermail='" . $king->db->escape(kc_post('usermail')) . "';")));
        if ($king->user->isuc && $GLOBALS['ismethod']) {
            //有提交操作的时候才做验证
            $ucheck = uc_user_checkemail(kc_post('usermail'));
            $_array[] = array('usermail', 12, $king->lang->get('system/check/reg/u' . $ucheck), $ucheck != 1);
        }
        $s .= $king->htmForm($king->lang->get('portal/user/mail'), '<input class="k_in w250" type="text" name="usermail" value="' . htmlspecialchars($data['usermail']) . '" maxlength="32" />', $_array);
        //verify
        $verify = new KC_Verify_class();
        $s .= $verify->Show();
        $but = kc_htm_a($king->lang->get('portal/user/register'), '{URL:\'' . $king->config('inst') . 'user/index.php\',CMD:\'register\',is:1,IS:1}');
        $height = $king->config('verifyopen') ? 210 + $king->config('verifyheight') : 200;
        $title = $king->lang->get('user/title/reguser');
    }
    if ($GLOBALS['ischeck']) {
        //先提交到ucenter后再提交到本地数据库
        if ($king->user->isuc) {
            $uid = uc_user_register($data['username'], $data['userpass'], $data['usermail']);
            if ($uid < 0) {
                error($king->lang->get('portal/check/reg/u' . $uid));
            }
            if ($uid == 0) {
                error($king->lang->get('portal/error/connect'));
            }
            //发出连接错误
        } else {
            $uid = 0;
            //没有UC的时候,uid设置为0,这样以后同步帐号仅同步uid=0的帐号$king->db->neworder('%s_user',null,'uid');//若没有UC链接的时候uid自动递增
        }
        $array_sql = array('username', 'usermail');
        $array = array();
        foreach ($array_sql as $val) {
            $array[$val] = $data[$val];
        }
        $salt = kc_random(6);
        $md5pass = md5($salt . $data['userpass']);
        $array['userpass'] = $md5pass;
        $array['uid'] = $uid;
        $array['ksalt'] = $salt;
        $array['regdate'] = time();
        $userid = $king->db->insert('%s_user', $array);
        //写Cookie
        $s = $king->user->userLogin($userid, 2592000);
        kc_ajax($king->lang->get('system/common/welcome'), $s . "<p class=\"k_ok\">" . $king->lang->get('portal/user/regok') . "</p>", 1);
    }
    kc_ajax($title, $s, $but, '', 500, $height + $GLOBALS['check_num'] * 15);
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:87,代码来源:index.php

示例7: define

<?php

/*
	[CYASK] (C)2007 Cyask.com QQ: 240508015
	Revision: 3.0.0 for Discuz
	Date: 2007/4/23
*/
define('CURSCRIPT', 'checkuser');
require './include/common.inc.php';
$username = trim($_GET['username']);
$email = trim($_GET['email']);
if (!empty($username) || !empty($email)) {
    if (!empty($username)) {
        $usernum = uc_user_checkname($username);
        if ($usernum == 1) {
            $text = 'yes';
        } elseif ($usernum == -3) {
            $text = 'no';
        } else {
            $text = 'error';
        }
    } elseif (!empty($email)) {
        $text = uc_user_checkemail($email);
    }
} else {
    $text = 'error';
}
echo $text;
开发者ID:yunsite,项目名称:cyaskuc,代码行数:28,代码来源:usercheck.php

示例8: ajax_email

 public function ajax_email()
 {
     $email = isset($_GET['email']) && trim($_GET['email']) ? trim($_GET['email']) : exit('0');
     $uid = isset($_GET['uid']) && trim($_GET['uid']) ? trim($_GET['uid']) : '';
     $where = !empty($uid) ? "`email` = '{$email}' AND `uid` != '{$uid}'" : array('email' => $email);
     if ($this->db->get_one($where)) {
         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_checkemail($email);
             if ($rs < 1) {
                 exit('0');
             }
         }
         exit('1');
     }
 }
开发者ID:boylzj,项目名称:omguitar,代码行数:20,代码来源:member.php

示例9: adminmsg

 if (empty($_POST['email']) || !preg_match("/^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$/", $_POST['email'])) {
     adminmsg('电子邮箱格式错误!', 1);
 }
 $sql['email'] = trim($_POST['email']);
 if (get_user_inusername($sql['username'])) {
     adminmsg('该用户名已经被使用!', 1);
 }
 if (get_user_inemail($sql['email'])) {
     adminmsg('该 Email 已经被注册!', 1);
 }
 if (defined('UC_API')) {
     include_once QISHI_ROOT_PATH . 'uc_client/client.php';
     if (uc_user_checkname($sql['username']) != "1") {
         adminmsg('该用户名已经被使用或者用户名非法!', 1);
         exit;
     } elseif (uc_user_checkemail($sql['email']) != "1") {
         adminmsg('该 Email已经被使用或者非法!', 1);
         exit;
     } else {
         uc_user_register($sql['username'], $sql['password'], $sql['email']);
     }
 }
 $sql['pwd_hash'] = randstr();
 $sql['password'] = md5(md5($sql['password']) . $sql['pwd_hash'] . $QS_pwdhash);
 $sql['reg_time'] = time();
 $sql['reg_ip'] = $online_ip;
 $insert_id = inserttable(table('members'), $sql, true);
 if ($sql['utype'] == "1") {
     $db->query("INSERT INTO " . table('members_points') . " (uid) VALUES ('{$insert_id}')");
     $db->query("INSERT INTO " . table('members_setmeal') . " (uid) VALUES ('{$insert_id}')");
     if (intval($_POST['is_money']) && $_POST['log_amount']) {
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:admin_company.php

示例10: checkEmail

 public function checkEmail($email)
 {
     $this->initDiscuzApi();
     $result = uc_user_checkemail($email);
     return $this->convertApiResult($result);
 }
开发者ID:fujianguo,项目名称:EduSoho,代码行数:6,代码来源:DiscuzAuthProvider.php

示例11: checkEmailExit

 /**
  * 电子邮件检查
  * @author Vimhui Develop Team
  * @param
  * @return bool
  */
 public function checkEmailExit($email)
 {
     return uc_user_checkemail($email);
 }
开发者ID:noikiy,项目名称:shopnc-minion,代码行数:10,代码来源:ucenter.model.php

示例12: check_mail

 public function check_mail($mail)
 {
     $ret = uc_user_checkemail($mail);
     if ($ret > 0) {
         return $mail;
     } else {
         if ($ret == -4) {
             $this->err->add('Email 格式有误', 282);
         } else {
             if ($ret == -5) {
                 $this->err->add('Email 不允许注册', 283);
             } else {
                 if ($ret == -6) {
                     $this->err->add('该 Email 已经被注册', 284);
                 } else {
                     $this->err->add('服务器内部错误,稍后重试', 285);
                 }
             }
         }
     }
     return false;
 }
开发者ID:a195474368,项目名称:ejiawang,代码行数:22,代码来源:ucenter.mdl.php

示例13: 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

示例14: checkemail

 function checkemail(&$msg, $email)
 {
     $ucresult = uc_user_checkemail($email);
     if ($ucresult == -4) {
         $msg = "Email 格式有误";
     } elseif ($ucresult == -5) {
         $msg = "Email 不允许注册";
     } elseif ($ucresult == -6) {
         $msg = "该 Email 已经被注册";
     }
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:11,代码来源:ucenter.class.php

示例15: empty

require './include/common.inc.php';
$url = empty($_GET['url']) ? $_POST['url'] : $_GET['url'];
if ($command == 'registed') {
    if ($cyask_uid) {
        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);
开发者ID:yunsite,项目名称:cyaskuc,代码行数:31,代码来源:register.php


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