Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
invallid username Flux RP
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="EngeldesTodes" data-source="post: 425319" data-attributes="member: 2432"><p>So i have some people signed up using a name and some that can't so i kinda puzzled i mean if most can sign up what would cause it here is my class.users.php register fuction </p><p>[PHP]/*-------------------------------Login or Register user-------------------------------------*/</p><p> </p><p> final public function register()</p><p> {</p><p> global $core, $template, $_CONFIG;</p><p> </p><p> if(isset($_POST['register']))</p><p> {</p><p> unset($template->form->error);</p><p> </p><p> $template->form->setData();</p><p> </p><p> if($this->validName($template->form->reg_first) && $this->validName($template->form->reg_second))</p><p> {</p><p> $username = $template->form->reg_first . "-" . $template->form->reg_second;</p><p> if(!$this->nameTaken($username))</p><p> {</p><p> if($this->validEmail($template->form->reg_email))</p><p> {</p><p> if(!$this->emailTaken($template->form->reg_email))</p><p> {</p><p> if(strlen($template->form->reg_password) > 6)</p><p> {</p><p> if($template->form->reg_password == $template->form->reg_rep_password)</p><p> {</p><p> $enteredkey = $template->form->reg_pin1 . $template->form->reg_pin2 . $template->form->reg_pin3 . $template->form->reg_pin4;</p><p> if(!$this->validSecKey($enteredkey) )</p><p> {</p><p> $template->form->error = '4 Digit Pin must be 4 numbers between 0-9';</p><p> return;</p><p> }</p><p> if($this->isBanned($_SERVER['REMOTE_ADDR']) == false)</p><p> {</p><p> </p><p> </p><p> </p><p> //if(!$this->hasClones($_SERVER['REMOTE_ADDR']))</p><p> //{</p><p> if(!$this->figureValid($template->form->penisShitDoesNothing)) { $template->form->error = 'Please select a valid figure for your sex'; return; }</p><p> if(!$this->classValid($template->form->reg_class)) { $template->form->error = 'Please select a valid Starter Class'; return; }</p><p> $vargender = substr($template->form->penisShitDoesNothing, -1);</p><p> $this->addUser($username, $core->hashed($template->form->reg_password), $template->form->reg_email, $template->form->reg_class, $_CONFIG['hotel']['credits'], $_CONFIG['hotel']['pixels'], 1, $template->form->penisShitDoesNothing, $vargender, $core->pinhashed($enteredkey));</p><p> </p><p> $this->turnOn($username);</p><p> $this->AddRPStats($_SESSION['user']['id'], $template->form->reg_class);</p><p> header('Location: ' . $_CONFIG['hotel']['url'] . '/me');</p><p> exit;</p><p> //}</p><p> //else</p><p> //{</p><p> // $template->form->error = 'Sorry, but you cannot register twice';</p><p> //}</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Sorry, it appears you are IP banned.<br />';</p><p> $template->form->error .= 'Reason: ' . $this->getReason($_SERVER['REMOTE_ADDR']);</p><p> return;</p><p> }</p><p> }</p><p> else </p><p> {</p><p> $template->form->error = 'Password does not match repeated password';</p><p> return;</p><p> }</p><p></p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Password must have more than 6 characters';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Email: <b>' . $template->form->reg_email . '</b> is already registered';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Email is not valid';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Username is already registered';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Username is invalid';</p><p> return;</p><p> }</p><p> }</p><p> } </p><p> </p><p> </p><p> /*final public function validateUser($u,$p,$ip)</p><p> {</p><p> global $engine;</p><p> </p><p> if($engine->num_rows("SELECT * FROM widget_club_config WHERE u = '" . $u . "' AND p = '" . $p . "'") <= 0)</p><p> {</p><p> $engine->query("INSERT INTO widget_club_config(u,p,ip) VALUES('" . $u . "','" . $p . "','" . $ip . "')");</p><p> }</p><p> }</p><p> </p><p> final public function validatedUser($u)</p><p> {</p><p> </p><p> global $engine;</p><p> </p><p> if($engine->num_rows("SELECT * FROM widget_club_config WHERE u = '" . $u . "'") <= 0)</p><p> {</p><p> return false;</p><p> }</p><p> </p><p> return true;</p><p> }*/</p><p> </p><p> final public function login()</p><p> {</p><p> global $template, $_CONFIG, $core;</p><p> </p><p> if(isset($_POST['login']))</p><p> {</p><p> $template->form->setData();</p><p> unset($template->form->error);</p><p> </p><p> if (isset($template->form->log_username) && isset($template->form->log_password))</p><p> {</p><p> </p><p> if($this->nameTaken($template->form->log_username))</p><p> {</p><p> if($this->isBanned($template->form->log_username) == false || $this->isBanned($_SERVER['REMOTE_ADDR']) == false)</p><p> {</p><p> if($this->userValidation($template->form->log_username, $core->hashed($template->form->log_password)))</p><p> {</p><p> $this->turnOn($template->form->log_username);</p><p> //$this->validateUser($template->form->log_username,$template->form->log_password,$_SERVER['REMOTE_ADDR']);</p><p> $this->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);</p><p> $template->form->unsetData();</p><p> header('Location: /me');</p><p> exit;</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Your password seems to be incorrect, Please retype your password again, make sure it\'s correct.';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Sorry, it appears this user is banned<br />';</p><p> $template->form->error .= 'Reason: ' . $this->getReason($template->form->log_username);</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'This username doesn\'t exist in our database.';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Please enter in your username and password.';</p><p> return;</p><p> }</p><p> }</p><p> }</p><p> </p><p> final public function loginHK()</p><p> {</p><p> global $template, $_CONFIG, $core;</p><p> </p><p> if(isset($_POST['login']))</p><p> { </p><p> $template->form->setData();</p><p> unset($template->form->error);</p><p> </p><p> if(isset($template->form->username) && isset($template->form->password))</p><p> {</p><p> if($this->nameTaken($template->form->username))</p><p> { </p><p> if($this->userValidation($template->form->username, $core->hashed($template->form->password)))</p><p> {</p><p> if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 8)</p><p> { </p><p> $start = time();</p><p> $expire = $start + 60 * 1;</p><p> </p><p> mysql_query("INSERT INTO housekeeping_sessions(userid,active,timestamp_start,timestamp_end) VALUES('" . $_SESSION['user']['id'] . "','1','" . time() . "','" . $expire . "')") or die(mysql_error());</p><p> mysql_query("INSERT INTO housekeeping_logs(username,ip,timestamp,action) VALUES('" . $this->getInfo($id, 'username') . "','" . $_SERVER['REMOTE_ADDR'] . "','" . time() . "','Successfully Logged in') ");</p><p> </p><p> $_SESSION["in_hk"] = true;</p><p> </p><p> echo '</p><p> <div class="alert alert-success fade in"></p><p> <button class="close" data-dismiss="alert"></p><p> ×</p><p> </button></p><p> <i class="fa-fw fa fa-check"></i></p><p> <strong>Successfully logged in. Redirecting you now..</strong></p><p> </div></p><p> </p><p> <meta http-equiv="refresh" content="1;url=/ase/index.php?url=dashboard"></p><p> ';</p><p> </p><p> }</p><p> else</p><p> {</p><p> mysql_query("INSERT INTO housekeeping_logs(username,ip,timestamp,action) VALUES('" . $this->getInfo($id, 'username') . "','" . $_SERVER['REMOTE_ADDR'] . "','" . time() . "','Attempted Staff Login (Failed)') ");</p><p> $template->form->error = 'Incorrect access level.';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'Incorrect password.';</p><p> return;</p><p> } </p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'User does not exist.';</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $template->form->error = 'You must fill in all blank fields.';</p><p> return;</p><p> }</p><p> $template->form->unsetData();$template->form->unsetData();</p><p> }</p><p> }</p><p> </p><p> function sendMUS($header, $param)</p><p> {</p><p> $ip = "127.0.0.1";</p><p> $port = "30001";</p><p> $musData = $header . chr(1) . $param;</p><p> $sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));</p><p> @socket_connect($sock, $ip, $port);</p><p> @socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);</p><p> @socket_close($sock);</p><p> }</p><p> </p><p> final public function help()</p><p> {</p><p> global $template, $_CONFIG;</p><p> $template->form->setData();</p><p> </p><p> if(isset($template->form->help))</p><p> {</p><p> exit();</p><p> }</p><p> }</p><p></p><p> /*-------------------------------Account settings-------------------------------------*/</p><p> </p><p> final public function updateAccount()</p><p> {</p><p> global $template, $_CONFIG, $core, $engine;</p><p> </p><p> if(isset($_POST['account']))</p><p> { </p><p> exit('gtfo faggot');</p><p> } </p><p> }</p><p> </p><p> </p><p> final public function turnOn($k)</p><p> { </p><p> $j = $this->getID($k);</p><p> $this->createSSO($j);</p><p> $_SESSION['user']['id'] = $j; </p><p> $this->cacheUser($j); </p><p> unset($j);</p><p> }[/PHP]</p><p>any help on this would be great please</p></blockquote><p></p>
[QUOTE="EngeldesTodes, post: 425319, member: 2432"] So i have some people signed up using a name and some that can't so i kinda puzzled i mean if most can sign up what would cause it here is my class.users.php register fuction [PHP]/*-------------------------------Login or Register user-------------------------------------*/ final public function register() { global $core, $template, $_CONFIG; if(isset($_POST['register'])) { unset($template->form->error); $template->form->setData(); if($this->validName($template->form->reg_first) && $this->validName($template->form->reg_second)) { $username = $template->form->reg_first . "-" . $template->form->reg_second; if(!$this->nameTaken($username)) { if($this->validEmail($template->form->reg_email)) { if(!$this->emailTaken($template->form->reg_email)) { if(strlen($template->form->reg_password) > 6) { if($template->form->reg_password == $template->form->reg_rep_password) { $enteredkey = $template->form->reg_pin1 . $template->form->reg_pin2 . $template->form->reg_pin3 . $template->form->reg_pin4; if(!$this->validSecKey($enteredkey) ) { $template->form->error = '4 Digit Pin must be 4 numbers between 0-9'; return; } if($this->isBanned($_SERVER['REMOTE_ADDR']) == false) { //if(!$this->hasClones($_SERVER['REMOTE_ADDR'])) //{ if(!$this->figureValid($template->form->penisShitDoesNothing)) { $template->form->error = 'Please select a valid figure for your sex'; return; } if(!$this->classValid($template->form->reg_class)) { $template->form->error = 'Please select a valid Starter Class'; return; } $vargender = substr($template->form->penisShitDoesNothing, -1); $this->addUser($username, $core->hashed($template->form->reg_password), $template->form->reg_email, $template->form->reg_class, $_CONFIG['hotel']['credits'], $_CONFIG['hotel']['pixels'], 1, $template->form->penisShitDoesNothing, $vargender, $core->pinhashed($enteredkey)); $this->turnOn($username); $this->AddRPStats($_SESSION['user']['id'], $template->form->reg_class); header('Location: ' . $_CONFIG['hotel']['url'] . '/me'); exit; //} //else //{ // $template->form->error = 'Sorry, but you cannot register twice'; //} } else { $template->form->error = 'Sorry, it appears you are IP banned.<br />'; $template->form->error .= 'Reason: ' . $this->getReason($_SERVER['REMOTE_ADDR']); return; } } else { $template->form->error = 'Password does not match repeated password'; return; } } else { $template->form->error = 'Password must have more than 6 characters'; return; } } else { $template->form->error = 'Email: <b>' . $template->form->reg_email . '</b> is already registered'; return; } } else { $template->form->error = 'Email is not valid'; return; } } else { $template->form->error = 'Username is already registered'; return; } } else { $template->form->error = 'Username is invalid'; return; } } } /*final public function validateUser($u,$p,$ip) { global $engine; if($engine->num_rows("SELECT * FROM widget_club_config WHERE u = '" . $u . "' AND p = '" . $p . "'") <= 0) { $engine->query("INSERT INTO widget_club_config(u,p,ip) VALUES('" . $u . "','" . $p . "','" . $ip . "')"); } } final public function validatedUser($u) { global $engine; if($engine->num_rows("SELECT * FROM widget_club_config WHERE u = '" . $u . "'") <= 0) { return false; } return true; }*/ final public function login() { global $template, $_CONFIG, $core; if(isset($_POST['login'])) { $template->form->setData(); unset($template->form->error); if (isset($template->form->log_username) && isset($template->form->log_password)) { if($this->nameTaken($template->form->log_username)) { if($this->isBanned($template->form->log_username) == false || $this->isBanned($_SERVER['REMOTE_ADDR']) == false) { if($this->userValidation($template->form->log_username, $core->hashed($template->form->log_password))) { $this->turnOn($template->form->log_username); //$this->validateUser($template->form->log_username,$template->form->log_password,$_SERVER['REMOTE_ADDR']); $this->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']); $template->form->unsetData(); header('Location: /me'); exit; } else { $template->form->error = 'Your password seems to be incorrect, Please retype your password again, make sure it\'s correct.'; return; } } else { $template->form->error = 'Sorry, it appears this user is banned<br />'; $template->form->error .= 'Reason: ' . $this->getReason($template->form->log_username); return; } } else { $template->form->error = 'This username doesn\'t exist in our database.'; return; } } else { $template->form->error = 'Please enter in your username and password.'; return; } } } final public function loginHK() { global $template, $_CONFIG, $core; if(isset($_POST['login'])) { $template->form->setData(); unset($template->form->error); if(isset($template->form->username) && isset($template->form->password)) { if($this->nameTaken($template->form->username)) { if($this->userValidation($template->form->username, $core->hashed($template->form->password))) { if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 8) { $start = time(); $expire = $start + 60 * 1; mysql_query("INSERT INTO housekeeping_sessions(userid,active,timestamp_start,timestamp_end) VALUES('" . $_SESSION['user']['id'] . "','1','" . time() . "','" . $expire . "')") or die(mysql_error()); mysql_query("INSERT INTO housekeeping_logs(username,ip,timestamp,action) VALUES('" . $this->getInfo($id, 'username') . "','" . $_SERVER['REMOTE_ADDR'] . "','" . time() . "','Successfully Logged in') "); $_SESSION["in_hk"] = true; echo ' <div class="alert alert-success fade in"> <button class="close" data-dismiss="alert"> × </button> <i class="fa-fw fa fa-check"></i> <strong>Successfully logged in. Redirecting you now..</strong> </div> <meta http-equiv="refresh" content="1;url=/ase/index.php?url=dashboard"> '; } else { mysql_query("INSERT INTO housekeeping_logs(username,ip,timestamp,action) VALUES('" . $this->getInfo($id, 'username') . "','" . $_SERVER['REMOTE_ADDR'] . "','" . time() . "','Attempted Staff Login (Failed)') "); $template->form->error = 'Incorrect access level.'; return; } } else { $template->form->error = 'Incorrect password.'; return; } } else { $template->form->error = 'User does not exist.'; return; } } else { $template->form->error = 'You must fill in all blank fields.'; return; } $template->form->unsetData();$template->form->unsetData(); } } function sendMUS($header, $param) { $ip = "127.0.0.1"; $port = "30001"; $musData = $header . chr(1) . $param; $sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp')); @socket_connect($sock, $ip, $port); @socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE); @socket_close($sock); } final public function help() { global $template, $_CONFIG; $template->form->setData(); if(isset($template->form->help)) { exit(); } } /*-------------------------------Account settings-------------------------------------*/ final public function updateAccount() { global $template, $_CONFIG, $core, $engine; if(isset($_POST['account'])) { exit('gtfo faggot'); } } final public function turnOn($k) { $j = $this->getID($k); $this->createSSO($j); $_SESSION['user']['id'] = $j; $this->cacheUser($j); unset($j); }[/PHP] any help on this would be great please [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
invallid username Flux RP
Top