mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-25 16:14:01 -05:00
Fix style in session library
This commit is contained in:
parent
9ca42db579
commit
c5bc304522
|
|
@ -148,8 +148,9 @@ class DefaultActionHandler {
|
|||
$challengeprefix = $dispatcher->verifyCrossDomainRequest();
|
||||
|
||||
$serverhostname = '' . $dispatcher->getServerHostName(@$reqData['serverid']);
|
||||
$user = array();
|
||||
$user['username'] = @$_POST['username'];
|
||||
$user = [
|
||||
'username' => @$_POST['username'],
|
||||
];
|
||||
$userid = $users->userid($user['username']);
|
||||
if ((mb_strlen($userid) < 1) || ctype_digit($userid)) {
|
||||
$out['actionerror'] = 'Your username must contain at least one letter.';
|
||||
|
|
|
|||
|
|
@ -645,15 +645,14 @@ class NTBBSession {
|
|||
"INSERT INTO `{$psdb->prefix}users` (`userid`,`username`,`passwordhash`,`email`,`registertime`,`ip`) VALUES (?, ?, ?, ?, ?, ?)",
|
||||
[$user['userid'], $user['username'], $user['passwordhash'], @$user['email'], $ctime, $this->getIp()]
|
||||
);
|
||||
if ($psdb->error())
|
||||
{
|
||||
if ($psdb->error()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$user['usernum'] = $psdb->insert_id();
|
||||
$this->login($user['username'], $password);
|
||||
if (!$curuser['loggedin']) return false;
|
||||
return $user;
|
||||
if (!$curuser['loggedin'] || $curuser['userid'] !== $user['userid']) return false;
|
||||
return $curuser;
|
||||
}
|
||||
|
||||
function wordfilter($text) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user