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

PHP uc_get_user函数代码示例

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

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



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

示例1: doSynlogin

 protected function doSynlogin($request, $get, $post)
 {
     if (!API_SYNLOGIN) {
         return API_RETURN_FORBIDDEN;
     }
     $partnerUser = uc_get_user($get['uid'], 1);
     $bind = $this->getUserService()->getUserBindByTypeAndFromId('discuz', $get['uid']);
     if (UC_CHARSET == 'gbk') {
         $get['username'] = iconv('gb2312', 'UTF-8', $get['username']);
     }
     if (empty($bind)) {
         $registration = array('nickname' => $get['username'], 'email' => $partnerUser[2], 'password' => substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8), 'createdTime' => $get['time'], 'createdIp' => $request->getClientIp(), 'token' => array('userId' => $get['uid']));
         if (!$this->getAuthService()->isRegisterEnabled()) {
             return API_RETURN_FORBIDDEN;
         }
         $user = $this->getUserService()->register($registration, 'discuz');
     } else {
         $user = $this->getUserService()->getUser($bind['toId']);
         if (empty($user)) {
             return API_RETURN_SUCCEED;
         }
     }
     $this->authenticateUser($user);
     return API_RETURN_SUCCEED;
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:25,代码来源:PartnerDiscuzController.php


示例2: register

 function register()
 {
     $activeuser = uc_get_user($this->base->post['username']);
     if ($activeuser) {
         $this->base->message('该用户无需注册,请直接登录!<br><a href="index.php?user/login">继续</a>');
     }
     $uid = uc_user_register($this->base->post['username'], $this->base->post['password'], $this->base->post['email']);
     if ($uid <= 0) {
         if ($uid == -1) {
             $this->base->message('用户名不合法');
         } elseif ($uid == -2) {
             $this->base->message('包含要允许注册的词语');
         } elseif ($uid == -3) {
             $this->base->message('用户名已经存在');
         } elseif ($uid == -4) {
             $this->base->message('Email 格式有误');
         } elseif ($uid == -5) {
             $this->base->message('Email 不允许注册');
         } elseif ($uid == -6) {
             $this->base->message('该 Email 已经被注册');
         } else {
             $this->base->message('未定义');
         }
     } else {
         if (isset($this->base->post['access_token'])) {
             $uid = $_ENV['user']->add($this->base->post['username'], $this->base->post['password'], $this->base->post['email'], $uid, $this->base->post['access_token']);
         } else {
             $_ENV['user']->add($this->base->post['username'], $this->base->post['password'], $this->base->post['email'], $uid);
         }
         $_ENV['user']->refresh($uid);
         $ucsynlogin = uc_user_synlogin($uid);
         $this->base->message('注册成功' . $ucsynlogin . '<br><a href="' . $_SERVER['PHP_SELF'] . '">继续</a>');
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:34,代码来源:ucenter.class.php


示例3: changePassword

 public function changePassword($userId, $oldPassword, $newPassword)
 {
     $this->initDiscuzApi();
     $user = uc_get_user($userId, 1);
     $result = uc_user_edit($user[1], null, $newPassword, null, 1);
     return $result == 1;
 }
开发者ID:fujianguo,项目名称:EduSoho,代码行数:7,代码来源:DiscuzAuthProvider.php


示例4: register_header

 function register_header()
 {
     global $_G;
     $inputemail = 'gp_' . $this->regemail['email'];
     $_G['gp_email'] = $_G[$inputemail];
     if ($_POST) {
         $_G['gp_activationauth'] = strip_tags(str_replace(" ", "+", $_G['gp_activationauth']));
         $activationinfo = authcode($_G['gp_activationauth'], $operation = 'DECODE');
         $activationinfoname = preg_replace("/\\s.+/i", "", $activationinfo);
         if ($activationinfoname) {
             loaducenter();
             if ($data = uc_get_user($activationinfoname)) {
                 list($uid, $username, $email) = $data;
             }
             $_G['gp_email'] = getEmail(strip_tags($email));
         } else {
             $_G['gp_email'] = getEmail(strip_tags($_G['gp_email']));
         }
         $_G['gp_rid'] = strip_tags($_G['gp_rid']);
         if (!$_G['gp_rid']) {
             showmessage('dsu_amufzc:1', '');
         }
         if (!$_G['gp_email']) {
             showmessage('dsu_amufzc:5', '');
         }
         $amutb = DB::table("plugin_dsuamfzc");
         $query = DB::fetch_first("SELECT * FROM {$amutb} WHERE rid = '" . $_G['gp_rid'] . "'");
         if (!$query || $query['yes'] == '1') {
             showmessage('dsu_amufzc:2', '');
         }
         if ($_G['gp_email'] != $query['email']) {
             showmessage('dsu_amufzc:11', '');
         }
     }
 }
开发者ID:v998,项目名称:dsu,代码行数:35,代码来源:fzc.class.php


示例5: member

 public function member($uname, $isuid = false)
 {
     if ($data = uc_get_user(addslashes($this->iconv($uname)), (bool) $isuid)) {
         list($uid, $uname, $mail) = $data;
         return array('uid' => $uid, 'uname' => $this->iconv($uname, true), 'mail' => $mail);
     }
     return false;
 }
开发者ID:a195474368,项目名称:ejiawang,代码行数:8,代码来源:ucenter.mdl.php


示例6: uc_feed_note

function uc_feed_note($username, $feed)
{
    $data = uc_get_user($username);
    if (!$data) {
        return '';
    }
    $uid = $data[0];
    return uc_feed_add($feed['icon'], $uid, $username, $feed['title_template'], $feed['title_data'], $feed['body_template'], $feed['body_data'], '', '', $feed['images']);
}
开发者ID:klr2003,项目名称:sourceread,代码行数:9,代码来源:uc.func.php


示例7: actionIndex

 public function actionIndex()
 {
     require_once 'ucenter.php';
     if ($data = uc_get_user(Yii::app()->user->name)) {
         list($uid, $username, $email) = $data;
     } else {
         echo '用户不存在';
     }
     $this->render('index', array('uid' => $uid, 'username' => $username, 'email' => $email));
 }
开发者ID:jackycgq,项目名称:advanced,代码行数:10,代码来源:ProfileController.php


示例8: synlogin

 function synlogin($get, $post)
 {
     !API_SYNLOGIN && exit(API_RETURN_FORBIDDEN);
     $ID = intval($get['uid']);
     for ($i = 0; $i < 2; $i++) {
         $user = get_user_by('id', $ID);
         if ($user) {
             header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
             wp_set_auth_cookie($ID, true, '');
             return API_RETURN_SUCCEED;
         }
         $query = uc_get_user($ID, 1);
         createUser($ID, $get['username'], $get['password'], $query[2]);
     }
     exit(API_RETURN_SUCCEED);
 }
开发者ID:hotmob,项目名称:likedome,代码行数:16,代码来源:uc.php


示例9: API_Login

function API_Login($user, $pass)
{
    global $db, $onlineip;
    include_once ONEZ_ROOT . './uc_client/client.php';
    $api = uc_user_login($user, $pass, 0);
    list($uid, $username, $password, $email) = $api;
    if ($uid < 0) {
        if ($uid == -1) {
            return '用户不存在,或者被删除';
        } elseif ($uid == -2) {
            return '用户名或密码不正确';
        } elseif ($uid == -3) {
            return '安全提问错';
        }
    }
    if (!$db) {
        include_once ONEZ_ROOT . './include/db_mysql.class.php';
        db_local();
        $db = new onez_db();
    }
    $db->reset();
    if ($db->rows("users", "uid='{$uid}'") == 0) {
        //创建本地用户
        if ($data = uc_get_user($uid, 1)) {
            list($uid, $username, $email) = $data;
            $arr = array('uid' => $uid, 'username' => $username, 'password' => md5($pass), 'email' => $email, 'infoip' => $onlineip, 'infotime' => time());
            $db->insert('users', $arr);
        }
    }
    $GLOBALS['cookiepre'] = 'onez_';
    osetcookie('userid', $uid, 31536000);
    osetcookie('username', $username, 31536000);
    echo uc_user_synlogin($uid);
    echo <<<ONEZ
<p align="center"><br /><br /><br /><br />
<a href="#" onclick="ReLoad()"><font size="2" color="#0000ff">正在同步登录中...</font></a>
</p>
<script type="text/javascript">
function ReLoad(){
  top.location.reload();
}
window.onload=ReLoad;
</script>
ONEZ;
    exit;
    return 'Y';
}
开发者ID:shenhua4286,项目名称:gxw,代码行数:47,代码来源:discuz.php


示例10: UcenterLogin

 public function UcenterLogin($data)
 {
     $db = new dbstuff();
     $db->connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, 0);
     list($uid, $username, $email) = uc_get_user($data['username']);
     if (is_null($uid)) {
         $_data['email'] = $data['email'];
         $_data['username'] = $data['username'];
         $_data['password'] = $data['password'];
         $_data['user_id'] = $data['user_id'];
         $uid = self::UcenterReg($_data);
         return self::UcenterLogin($data);
     } else {
         $ucsynlogin = uc_user_synlogin($uid);
     }
     //var_dump($uid);
     return $ucsynlogin;
 }
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:18,代码来源:Ucenter_model.php


示例11: ajax_reg_action

 function ajax_reg_action()
 {
     $post = array_keys($_POST);
     $key_name = $post[0];
     if (!in_array($key_name, array('username', 'email'))) {
         exit;
     }
     $Member = $this->MODEL("userinfo");
     if ($key_name == "username") {
         $username = yun_iconv("utf-8", "gbk", $_POST['username']);
         if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) {
             echo 2;
             die;
         }
         if ($this->config['sy_uc_type'] == "uc_center") {
             $this->uc_open();
             $user = uc_get_user($username);
         } else {
             $user = $Member->GetMemberNum(array("username" => $username));
         }
         if ($this->config['sy_regname'] != "") {
             $regname = @explode(",", $this->config['sy_regname']);
             if (in_array($username, $regname)) {
                 echo 3;
                 die;
             }
         }
     } elseif ($key_name == "email") {
         if (!$this->CheckRegEmail($_POST['email'])) {
             echo 2;
             die;
         }
         $user = $Member->GetMemberNum(array("`email`='" . $_POST['email'] . "' or `username`='" . $_POST['email'] . "'"));
     }
     if ($user) {
         echo 1;
     } else {
         echo 0;
     }
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:40,代码来源:index.class.php


示例12: ajax_reg_action

 function ajax_reg_action()
 {
     $post = array_keys($_POST);
     $key_name = $post[0];
     if (!in_array($key_name, array('username', 'email'))) {
         exit;
     }
     if ($key_name == "username") {
         $username = $this->stringfilter($_POST['username']);
         if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) {
             echo 2;
             die;
         }
         if ($this->config['sy_uc_type'] == "uc_center") {
             $this->obj->uc_open();
             $user = uc_get_user($username);
         } else {
             $user = $this->obj->DB_select_num("member", "`username`='" . $username . "'");
         }
         if ($this->config['sy_regname'] != "") {
             $regname = @explode(",", $this->config['sy_regname']);
             if (in_array($username, $regname)) {
                 echo 2;
                 die;
             }
         }
     } elseif ($key_name == "email") {
         if (!$this->CheckRegEmail($_POST['email'])) {
             echo 2;
             die;
         }
         $user = $this->obj->DB_select_num("member", "`email`='" . $_POST['email'] . "' or `username`='" . $_POST['email'] . "'");
     }
     if ($user) {
         echo 1;
     } else {
         echo 0;
     }
 }
开发者ID:keyu199314,项目名称:php,代码行数:39,代码来源:register.class.php


示例13: set_login

/**
 * 设置用户登陆
 *
 * @access public
 * @param int $uid            
 * @return void
 */
function set_login($user_id = '', $user_name = '')
{
    if (empty($user_id)) {
        return;
    } else {
        $sql = "SELECT user_name, email FROM {pre}users  WHERE user_id='$user_id' LIMIT 1";
        $row = $GLOBALS['db']->query($sql);
        $row = reset($row);
        if ($row) {
            set_cookie($user_id, $row['user_name'], $row['email']);
            set_session($user_id, $row['user_name'], $row['email']);
            update_user_info();
        } else {
            include_once (ROOT_PATH . 'plugins/uc_client/client.php');
            if ($data = uc_get_user($user_name)) {
                list ($uid, $uname, $email) = $data;
                $sql = "REPLACE INTO {pre}users (user_id, user_name, email) VALUES('$uid', '$uname', '$email')";
                $GLOBALS['db']->query($sql);
                set_login($uid);
            } else {
                return false;
            }
        }
    }
}
开发者ID:sayi21cn,项目名称:ecshopAndEctouch,代码行数:32,代码来源:uc.php


示例14: checkuser

    }
    checkuser($_POST['id'], $member['authstr']);
    uc_user_edit(addslashes($member['username']), $_POST['newpasswd'], $_POST['newpasswd'], $_POST['email'], 1);
    updatetable('members', array('authstr' => ''), array('uid' => $_POST['uid']));
    showmessage('getpasswd_succeed', geturl('action/login'));
}
$_GET['op'] = trim($_GET['op']);
if ($_GET['op'] == 'reset') {
    $_GET['uid'] = intval($_GET['uid']);
    $_GET['id'] = trim($_GET['id']);
    $query = $_SGLOBAL['db']->query("SELECT uid, username, authstr FROM " . tname('members') . " WHERE uid='{$_GET['uid']}'");
    $member = $_SGLOBAL['db']->fetch_array($query);
    if (empty($member)) {
        showmessage('user_does_not_exist', geturl('action/login'));
    }
    $user = uc_get_user($member['username']);
    checkuser($_GET['id'], $member['authstr']);
}
include template('site_lostpasswd');
//验证地址地否有效
function checkuser($id, $space)
{
    global $_SGLOBAL;
    if (empty($space)) {
        showmessage('link_failure', geturl('action/login'));
    }
    list($dateline, $operation, $idstring) = explode("\t", $space);
    if ($dateline < $_SGLOBAL['timestamp'] - 86400 * 3 || $operation != 1 || $idstring != $id) {
        showmessage('getpasswd_illegal');
    }
}
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:do_lostpasswd.php


示例15: getnewname

 public static function getnewname($openid)
 {
     global $_G;
     if (!$_G['wechat']['setting']) {
         $_G['wechat']['setting'] = unserialize($_G['setting']['mobilewechat']);
     }
     $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']);
     $userinfo = $wechat_client->getUserInfoById($openid);
     if ($userinfo) {
         $defaultusername = substr(WeChatEmoji::clear($userinfo['nickname']), 0, 15);
         loaducenter();
         $user = uc_get_user($defaultusername);
         if (!empty($user)) {
             $defaultusername = cutstr($defaultusername, 7, '') . '_' . random(5);
         }
     } else {
         $defaultusername = 'wx_' . random(5);
     }
     return $defaultusername;
 }
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:20,代码来源:wechat.class.php


示例16: elseif

         } elseif ($ucid == -3) {
             array_push($checkresults, array('ucreg_username' => $lang['user_name_already_exists']));
         } elseif ($ucid == -4) {
             array_push($checkresults, array('ucreg_email' => $lang['email_format_is_wrong']));
         } elseif ($ucid == -5) {
             array_push($checkresults, array('ucreg_email' => $lang['email_not_registered']));
         } elseif ($ucid == -6) {
             array_push($checkresults, array('ucreg_email' => $lang['email_has_been_registered']));
         } else {
             array_push($checkresults, array('message' => $lang['register_error']));
         }
         if (!empty($checkresults)) {
             cpmsg('user_info_failed', '', '', '', true, true, $checkresults);
         }
     }
     $ucdata = uc_get_user($ucid, 1);
     list($ucid, $ucname, $ucemail) = $ucdata;
     //unset所有uc註冊變量
     $ucarr = array('ucreg_username', 'ucreg_password', 'ucreg_rtpassword', 'ucreg_email');
     foreach ($ucarr as $value) {
         unset($_POST[$value]);
     }
 }
 //提交了數據
 if ($itemid = pkpost($cacheinfo)) {
     if (in_array($mname, array('good', 'notice', 'consume', 'album', 'groupbuy'))) {
         if (!empty($_POST['attr_ids'])) {
             require_once B_ROOT . '/batch.attribute.php';
             setattributesettings($_POST['catid'], $itemid, $_POST['attr_ids']);
         }
         if ($mname == 'good' || $mname == 'groupbuy') {
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:edit.inc.php


示例17: synlogin

 /**
  * 同步登录 
  */
 public function synlogin($get, $post)
 {
     if (!API_SYNLOGIN) {
         return API_RETURN_FORBIDDEN;
     }
     header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
     $username = trim($get['username']);
     $login_time = $get['time'];
     $user_info = $this->_user_mod->field('id,username')->where(array('username' => $username))->find();
     if (!$user_info) {
         $uc_user = uc_get_user($username);
         $user_id = $this->_user_mod->add(array('uc_uid' => $uc_user['uid'], 'username' => $uc_user['username'], 'password' => md5(time() . rand(100000, 999999)), 'email' => $uc_user['email']));
         $user_info = array('id' => $user_id, 'username' => $username);
     }
     //登录
     $this->_api_visitor()->assign_info($user_info);
     // 更新用户信息
     $this->_user_mod->where(array('id' => $user_info['id']))->save(array('last_time' => $login_time, 'last_ip' => get_client_ip()));
     return API_RETURN_SUCCEED;
 }
开发者ID:kid2682,项目名称:SMZDM,代码行数:23,代码来源:indexAction.class.php


示例18: delete_train_user

function delete_train_user($uid)
{
    global $db;
    if (!is_array($uid)) {
        $uid = array($uid);
    }
    $sqlin = implode(",", $uid);
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $sqlin)) {
        if (defined('UC_API')) {
            include_once QISHI_ROOT_PATH . 'uc_client/client.php';
            foreach ($uid as $tuid) {
                $userinfo = get_user($tuid);
                $uc_user = uc_get_user($userinfo['username']);
                $uc_uid_arr[] = $uc_user[0];
            }
            uc_user_delete($uc_uid_arr);
        }
        if (!$db->query("Delete from " . table('members') . " WHERE uid IN (" . $sqlin . ")")) {
            return false;
        }
        if (!$db->query("Delete from " . table('members_info') . " WHERE uid IN (" . $sqlin . ")")) {
            return false;
        }
        if (!$db->query("Delete from " . table('members_log') . " WHERE log_uid IN (" . $sqlin . ")")) {
            return false;
        }
        if (!$db->query("Delete from " . table('members_points') . " WHERE uid IN (" . $sqlin . ")")) {
            return false;
        }
        if (!$db->query("Delete from " . table('order') . " WHERE uid IN (" . $sqlin . ")")) {
            return false;
        }
        if (!$db->query("Delete from " . table('members_train_setmeal') . " WHERE uid IN (" . $sqlin . ")")) {
            return false;
        }
        return true;
        write_log("删除会员uid为" . $sqlin . "的培训机构会员", $_SESSION['admin_name'], 3);
    }
    return false;
}
开发者ID:winiceo,项目名称:job,代码行数:40,代码来源:admin_train_fun.php


示例19: _do_email_login

 private function _do_email_login()
 {
     $username = $_POST['username'];
     $password = $_POST['password'];
     if (strpos($username, "@") > 0) {
         //邮箱登陆
         $where['user_email'] = $username;
     } else {
         $where['user_login'] = $username;
     }
     $users_model = M('Users');
     $result = $users_model->where($where)->find();
     $ucenter_syn = C("UCENTER_ENABLED");
     $ucenter_old_user_login = false;
     $ucenter_login_ok = false;
     if ($ucenter_syn) {
         setcookie("thinkcmf_auth", "");
         include UC_CLIENT_ROOT . "client.php";
         list($uc_uid, $username, $password, $email) = uc_user_login($username, $password);
         if ($uc_uid > 0) {
             if (!$result) {
                 $data = array('user_login' => $username, 'user_email' => $email, 'user_pass' => sp_password($password), 'last_login_ip' => get_client_ip(0, true), 'create_time' => time(), 'last_login_time' => time(), 'user_status' => '1', 'user_type' => 2);
                 $id = $users_model->add($data);
                 $data['id'] = $id;
                 $result = $data;
             }
         } else {
             switch ($uc_uid) {
                 case "-1":
                     //用户不存在,或者被删除
                     if ($result) {
                         //本应用已经有这个用户
                         if (sp_compare_password($password, $result['user_pass'])) {
                             //本应用已经有这个用户,且密码正确,同步用户
                             $uc_uid2 = uc_user_register($username, $password, $result['user_email']);
                             if ($uc_uid2 < 0) {
                                 $uc_register_errors = array("-1" => "用户名不合法", "-2" => "包含不允许注册的词语", "-3" => "用户名已经存在", "-4" => "Email格式有误", "-5" => "Email不允许注册", "-6" => "该Email已经被注册");
                                 $this->error("同步用户失败--" . $uc_register_errors[$uc_uid2]);
                             }
                             $uc_uid = $uc_uid2;
                         } else {
                             $this->error("密码错误1!");
                         }
                     }
                     break;
                 case -2:
                     //密码错
                     if ($result) {
                         //本应用已经有这个用户
                         if (sp_compare_password($password, $result['user_pass'])) {
                             //本应用已经有这个用户,且密码正确,同步用户
                             $uc_user_edit_status = uc_user_edit($username, "", $password, "", 1);
                             if ($uc_user_edit_status <= 0) {
                                 $this->error("登陆错误3!");
                             }
                             list($uc_uid2) = uc_get_user($username);
                             $uc_uid = $uc_uid2;
                             $ucenter_old_user_login = true;
                         } else {
                             $this->error("密码错误4!");
                         }
                     } else {
                         $this->error("密码错误1!");
                     }
                     break;
             }
         }
         $ucenter_login_ok = true;
         echo uc_user_synlogin($uc_uid);
     }
     //exit();
     if (!empty($result)) {
         if (sp_compare_password($password, $result['user_pass']) || $ucenter_login_ok) {
             $_SESSION["user"] = $result;
             //写入此次登录信息
             $data = array('last_login_time' => date("Y-m-d H:i:s"), 'last_login_ip' => get_client_ip(0, true));
             $users_model->where("id=" . $result["id"])->save($data);
             $redirect = empty($_SESSION['login_http_referer']) ? __ROOT__ . "/" : $_SESSION['login_http_referer'];
             $_SESSION['login_http_referer'] = "";
             $ucenter_old_user_login_msg = "";
             if ($ucenter_old_user_login) {
                 //$ucenter_old_user_login_msg="老用户请在跳转后,再次登陆";
             }
             $this->success("登录验证成功!", $redirect);
         } else {
             $this->error("密码错误7!");
         }
     } else {
         $this->error("用户名不存在!");
     }
 }
开发者ID:lvxiaolin,项目名称:thinkcfm,代码行数:91,代码来源:LoginController.class.php


示例20: dirname

include_once dirname(__FILE__) . '/include/general.inc.php';
include_once M_ROOT . './include/common.fun.php';
if (empty($forward)) {
    $forward = empty($enable_pptout) || $pptout_file != 'phpwind' ? M_REFERER : $cms_abs;
}
$mode = empty($mode) ? '' : $mode;
$action = empty($action) ? 'login' : $action;
$getval = empty($enable_pptout) || $pptout_file != 'phpwind' ? 'forward' : 'jumpurl';
if ($action == 'login') {
    $memberid && $mode != 'js' && message('dontrepeatlogin', '', '<a href="?action=logout">' . lang('logout') . '</a>');
    if ($memberid && $enable_uc) {
        require_once M_ROOT . './include/ucenter/config.inc.php';
        require_once M_ROOT . './uc_client/client.php';
        $ucresult = uc_get_user($curuser->info['mname']);
        if (is_array($ucresult)) {
            list($uid, $username) = uc_get_user($curuser->info['mname']);
            $uc_synlogin = uc_user_synlogin($uid);
            echo $ucsynlogin;
        }
    }
    if (!submitcheck('cmslogin')) {
        $temparr = array('forward' => rawurlencode($forward));
        if ($mode == 'js') {
            js_write(template(empty($curuser->info['mid']) ? 'jslogin' : 'jsloginok', $temparr));
            mexit();
        } else {
            if ($enable_pptin && !empty($pptin_url) && $pptin_login) {
                $url = $pptin_url . $pptin_login;
                $url .= (strpos($url, '?') ? '&' : '?') . "{$getval}=" . rawurlencode($forward);
                header('location:' . $url);
                exit;
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:login.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP uc_pm_checknew函数代码示例发布时间:2022-05-23
下一篇:
PHP uc_fopen2函数代码示例发布时间: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