Skip to content

Commit

Permalink
Merge pull request #696 from causefx/cero-dev
Browse files Browse the repository at this point in the history
Fix New Registration
  • Loading branch information
causefx authored Oct 28, 2017
2 parents 47e41b9 + fe8d10d commit 2876c41
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions user.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,16 @@ function homogenise_username($string)
*/
function register_user($username, $email, $sha1, &$registration_callback = false, $settings, $validate) {
//Admin bypass
if(in_arrayi($_SESSION["username"], $this->get_admin_list())){
$token = $this->get_user_token($_SESSION["username"]);
if($token == $_SESSION["token"]) {
$validate = true;
writeLog("success", "Admin Override on registration for $username info");
if($validate == null){
$adminList = $this->get_admin_list();
if($adminList){
if(in_arrayi($_SESSION["username"], $adminList)){
$token = $this->get_user_token($_SESSION["username"]);
if($token == $_SESSION["token"]) {
$validate = true;
writeLog("success", "Admin Override on registration for $username info");
}
}
}
}
$username = strtolower($username);
Expand Down

0 comments on commit 2876c41

Please sign in to comment.