From: Johnnie Lamar Odom II Date: Sun, 20 Sep 2020 22:36:52 +0000 (-0500) Subject: Adding bugxies to scaffolding that should have been included in Ginsburg release X-Git-Url: https://git.planwatch.world/gitweb/?a=commitdiff_plain;h=HEAD;p=planworld_public.git Adding bugxies to scaffolding that should have been included in Ginsburg release --- diff --git a/code/scaffolding/adduser.php b/code/scaffolding/adduser.php index afa8037..2814b05 100644 --- a/code/scaffolding/adduser.php +++ b/code/scaffolding/adduser.php @@ -15,7 +15,7 @@ if(!ctype_alnum($username)){ $message = "Usernames for this test site must be alphanumeric"; } - else if(Planworld::isUser($username)){ + else if(intval(Planworld::isUser($username)) > 0){ $message = 'User ' . $username . ' already exists.'; } else{ @@ -23,7 +23,7 @@ $newby->create(); $userExists = new User($username); $userId = $userExists->userID; - $pass = str_replace('.', '',(str_replace('/', '', crypt($stringLoginUser, ((int)$intLoginUser + 45678))))); + $pass = str_replace('.', '',(str_replace('/', '', crypt($username, ((int)$userId + 45678))))); $message = 'User ' . $username . ' created with password ' . $pass; } } diff --git a/code/scaffolding/getusers.php b/code/scaffolding/getusers.php index d94ce98..3146d70 100644 --- a/code/scaffolding/getusers.php +++ b/code/scaffolding/getusers.php @@ -19,7 +19,7 @@ if((isset($_POST['loginusername'])) && (isset($_POST['loginpassword']))){ else{ $userExists = new User($username); $userId = $userExists->userID; - $comparepass = crypt($username, ((int)$userId + 45678)); + $comparepass = str_replace('.', '',(str_replace('/', '', crypt($username, ((int)$userId + 45678))))); if(strcmp($password, $comparepass) == 0){ $pw = new Planworld(); $arrayUsers = $pw->getAllUsers();