if (!$rg_rglower) { for ($asc = 65; $asc <= 90; $asc++) { if (strpos($pwuser, chr($asc)) !== false) { Showmsg('username_limit'); } } } $pwuser == 'guest' && Showmsg('illegal_username'); $rg_banname = explode(',', $rg_banname); foreach ($rg_banname as $value) { if (strpos($pwuser, $value) !== false) { Showmsg('illegal_username'); } } require_once R_P . 'require/functions.php'; if ($pwuser !== Sql_cv($pwuser)) { Showmsg('illegal_username'); } $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ if ($userService->isExistByUserName($pwuser)) { Showmsg('username_same'); } $ucuser = L::loadClass('Ucuser', 'user'); list($ucstatus, $errmsg) = $ucuser->edit($winduid, $windid, array('username' => $pwuser)); if ($ucstatus < 0) { Showmsg($errmsg); } /* $userService->update($winduid, array('username' => $pwuser)); $db->update("UPDATE pw_threads SET author=".S::sqlEscape($pwuser)."WHERE authorid=".S::sqlEscape($winduid));
/** * @static */ function checkName($regname) { if (!PW_Register::checkNameLen(strlen($regname))) { Showmsg('reg_username_limit'); } if (str_replace($this->illegalChar, '', $regname) != $regname) { Showmsg('illegal_username'); } if (!L::reg('rg_rglower') && !PW_Register::checkRglower($regname)) { Showmsg('username_limit'); } if (S::inArray(strtolower($regname), array('guest', 'system'))) { Showmsg('illegal_username'); } $banname = explode(',', L::reg('rg_banname')); foreach ($banname as $key => $value) { if ($value !== '' && strpos($regname, $value) !== false) { Showmsg('illegal_username'); } } require_once R_P . 'require/functions.php'; if ($regname !== Sql_cv($regname)) { Showmsg('illegal_username'); } }
$e_check = 0; $e_limit = explode(',', $rg_email); foreach ($e_limit as $key => $val) { if (strpos($regemail, "@" . $val) !== false) { $e_check = 1; break; } } $e_check == 0 && wap_msg('email_check'); } $email_check = $db->get_one('SELECT COUNT(*) AS count FROM pw_members WHERE email=' . pwEscape($regemail)); if ($email_check['count']) { wap_msg('reg_email_have_same', $basename); } } if ($regname !== Sql_cv($regname)) { wap_msg('illegal_username', $basename); } $rs = $db->get_one('SELECT COUNT(*) AS count FROM pw_members WHERE username='******'count'] > 0) { wap_msg('username_same', $basename); } CkInArray(strtolower($regname), array('guest', 'system')) && wap_msg('illegal_username'); $rg_banname = explode(',', $rg_banname); foreach ($rg_banname as $value) { if ($value && strpos($regname, $value) !== false) { wap_msg('illegal_username', $basename); } } if ($rg_ifcheck == '1') { $rg_groupid = '7';