本文整理汇总了PHP中L::reg方法的典型用法代码示例。如果您正苦于以下问题:PHP L::reg方法的具体用法?PHP L::reg怎么用?PHP L::reg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类L
的用法示例。
在下文中一共展示了L::reg方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkEmail
/**
* @static
*/
function checkEmail($regemail)
{
if (empty($regemail) || !ereg("^[-a-zA-Z0-9_\\.]+\\@([0-9A-Za-z][0-9A-Za-z-]+\\.)+[A-Za-z]{2,5}\$", $regemail)) {
Showmsg('illegal_email');
}
if (L::reg('rg_emailtype') == 1 && L::reg('rg_email')) {
$e_check = 0;
$e_limit = explode(',', L::reg('rg_email'));
foreach ($e_limit as $key => $val) {
if (strpos($regemail, "@" . $val) !== false) {
$e_check = 1;
break;
}
}
$e_check == 0 && Showmsg('email_check');
} elseif (L::reg('rg_emailtype') == 2 && L::reg('rg_banemail')) {
$e_check = 0;
$e_limit = explode(',', L::reg('rg_banemail'));
foreach ($e_limit as $key => $val) {
if (strpos($regemail, "@" . $val) !== false) {
$e_check = 1;
break;
}
}
$e_check == 1 && Showmsg('email_bancheck');
}
$email_check = $this->db->get_one('SELECT COUNT(*) AS count FROM pw_members WHERE email=' . S::sqlEscape($regemail));
if ($email_check['count']) {
Showmsg('reg_email_have_same');
}
}
示例2: userRegister
function userRegister($username, $password, $email)
{
list($username, $password, $email, $timestamp) = array(trim($username), trim($password), trim($email), time());
if (empty($username) || empty($password) || empty($email)) {
return $this->buildResponse(USER_INVALID_PARAMS);
}
$rgConfig = L::reg();
if ($rgConfig['rg_allowregister'] == 0 || $rgConfig['rg_registertype'] == 1 && date('j', $timestamp) != $rgConfig['rg_regmon'] || $rgConfig['rg_registertype'] == 2 && date('w', $timestamp) != $rgConfig['rg_regweek']) {
return $this->buildResponse(USER_REGISTER_CLOSE);
}
if (L::reg('rg_npdifferf') && $username == $password) {
return $this->buildResponse(USER_REGISTER_SAME_USERNAME_PASSWORD);
}
$register = L::loadClass('Register', 'user');
/* @var $register PW_Register */
$register->setStatus(11);
$register->setName($username);
$register->setPwd($password, $password);
$register->setEmail($email);
$register->execute();
list($uid, $rgyz, $safecv) = $register->getRegUser();
if ($uid < 1) {
return $this->buildResponse(USER_REGISTER_FAIL);
}
if ($rgConfig['rg_regsendmsg']) {
$rgConfig['rg_welcomemsg'] = str_replace('$rg_name', $username, $rgConfig['rg_welcomemsg']);
M::sendNotice(array($uid), array('title' => "Welcome To[{$GLOBALS[db_bbsname]}]!", 'content' => $rgConfig['rg_welcomemsg']));
}
return $this->buildResponse(0, array('uid' => $uid));
}
示例3: exit
<?php
!defined('W_P') && exit('Forbidden');
wap_header();
$rg_config = L::reg();
require_once PrintWAP('items');
wap_footer();
示例4: weiboResetUserPassword
function weiboResetUserPassword($userId, $password, $repeatPassword)
{
global $db_ckpath, $db_ckdomain;
if ('' == $password || '' == $repeatPassword) {
Showmsg('创建密码不能为空');
}
$rg_config = L::reg();
list($rg_regminpwd, $rg_regmaxpwd) = explode("\t", $rg_config['rg_pwdlen']);
$register = L::loadClass('Register', 'user');
$register->checkPwd($password, $repeatPassword);
$weiboLoginService = L::loadClass('WeiboLoginService', 'sns/weibotoplatform/service');
/* @var $weiboLoginService PW_WeiboLoginService */
$isSuccess = $weiboLoginService->resetLoginUserPassword($userId, $password);
if (!$isSuccess) {
return false;
}
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$user = $userService->get($userId);
Cookie("winduser", StrCode($userId . "\t" . PwdCode($user['password']) . "\t" . $user['safecv']));
Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain);
Cookie('lastvisit', '', 0);
//自动获取勋章_start
require_once R_P . 'require/functions.php';
doMedalBehavior($userId, 'continue_login');
//自动获取勋章_end
return true;
}
示例5: isRegClose
function isRegClose()
{
global $timestamp;
$rg_config = L::reg();
return $rg_config['rg_allowregister'] == 0 || $rg_config['rg_registertype'] == 1 && date('j', $timestamp) != $rg_config['rg_regmon'] || $rg_config['rg_registertype'] == 2 && date('w', $timestamp) != $rg_config['rg_regweek'];
}