diff --git a/sections/tools/misc/create_user.php b/sections/tools/misc/create_user.php index 6b4844fd..159f7830 100644 --- a/sections/tools/misc/create_user.php +++ b/sections/tools/misc/create_user.php @@ -20,31 +20,37 @@ if (!empty($Username) && !empty($Email) && !empty($Password)) { //Create hashes... - $Secret=Users::make_secret(); - $torrent_pass=Users::make_secret(); + $Secret = Users::make_secret(); + $torrent_pass = Users::make_secret(); //Create the account - $DB->query("INSERT INTO users_main (Username,Email,PassHash,torrent_pass,Enabled,PermissionID, Language) VALUES ('".db_string($Username)."','".db_string($Email)."','".db_string(Users::make_crypt_hash($Password))."','".db_string($torrent_pass)."','1','".USER."', 'en')"); + $DB->query(" + INSERT INTO users_main + (Username, Email, PassHash, torrent_pass, Enabled, PermissionID, Language) + VALUES + ('".db_string($Username)."','".db_string($Email)."','".db_string(Users::make_crypt_hash($Password))."','".db_string($torrent_pass)."','1','".USER."', 'en')"); //Increment site user count $Cache->increment('stats_user_count'); - //Grab the userid - $UserID=$DB->inserted_id(); + //Grab the userID + $UserID = $DB->inserted_id(); Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $torrent_pass)); //Default stylesheet $DB->query("SELECT ID FROM stylesheets"); - list($StyleID)=$DB->next_record(); + list($StyleID) = $DB->next_record(); //Auth key $AuthKey = Users::make_secret(); //Give them a row in users_info - $DB->query("INSERT INTO users_info - (UserID,StyleID,AuthKey,JoinDate) VALUES - ('".db_string($UserID)."','".db_string($StyleID)."','".db_string($AuthKey)."', '".sqltime()."')"); + $DB->query(" + INSERT INTO users_info + (UserID, StyleID, AuthKey, JoinDate) + VALUES + ('".db_string($UserID)."','".db_string($StyleID)."','".db_string($AuthKey)."', '".sqltime()."')"); //Redirect to users profile header ("Location: user.php?id=".$UserID); @@ -80,6 +86,7 @@

Create a User

+
@@ -101,7 +108,8 @@
- + diff --git a/sections/user/edit.php b/sections/user/edit.php index d7f1ecd5..ccc3b11e 100644 --- a/sections/user/edit.php +++ b/sections/user/edit.php @@ -358,8 +358,8 @@ function checked($Checked) { Preset - Show everything - Show stats only + + diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index b65abd4b..2ff30c1d 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -561,7 +561,7 @@ Tools::disable_users($UserID, '', 1); } elseif ($EnableUser == '1') { $Cache->increment('stats_user_count'); - Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']), true); + Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass'])); if (($Cur['Downloaded'] == 0) || ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio'])) { $UpdateSet[] = "i.RatioWatchEnds='0000-00-00 00:00:00'"; $CanLeech = 1; @@ -574,7 +574,7 @@ $UpdateSet[] = "i.RatioWatchDownload=m.Downloaded"; $CanLeech = 0; } - Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => '0'), true); + Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => '0')); } $UpdateSet[] = "Enabled='1'"; $LightUpdates['Enabled'] = 1;