small amount of changes that isn't worth mentioning

This commit is contained in:
flash 2015-11-10 21:03:29 +01:00
parent cfa1326824
commit b5809d5fe8
4 changed files with 3 additions and 54 deletions

View file

@ -571,37 +571,6 @@ class Users
return [1, 'SUCCESS'];
}
// Deactivating a user
public static function deactivateUser($uid)
{
// Get the user data
$user = Database::fetch('users', false, ['user_id' => [$uid, '=']]);
// Check if user exists
if (!count($user) > 1) {
return [0, 'USER_NOT_EXIST'];
}
// Check if user is already deactivated
if (Permissions::check('SITE', 'DEACTIVATED', $user['user_id'], 1)) {
return [0, 'USER_ALREADY_DEACTIVE'];
}
// Deactivate the account
Database::update('users', [
[
'rank_main' => 2,
'user_ranks' => json_encode([2]),
],
[
'user_id' => [$uid, '='],
],
]);
// Return success
return [1, 'SUCCESS'];
}
// Check if registration code is valid
public static function checkRegistrationCode($code)
{
@ -1008,18 +977,6 @@ class Users
return $ranks;
}
// Get all warnings issued to a user (or all warnings a user issued)
public static function getWarnings($uid = 0, $iid = false)
{
// Do the database query
$warnings = Database::fetch('warnings', true, ($uid ? [
($iid ? 'moderator_id' : 'user_id') => [$uid, '='],
] : null));
// Return all the warnings
return $warnings;
}
// Get a user's notifications
public static function getNotifications($uid = null, $timediff = 0, $excludeRead = true, $markRead = false)
{
@ -1090,12 +1047,6 @@ class Users
]);
}
// Getting a user's PMs
public static function getPrivateMessages($from = false)
{
return [];
}
// Get friends
public static function getFriends($uid = null, $timestamps = false, $getData = false, $checkOnline = false)
{

View file

@ -27,5 +27,5 @@
</div>
</div>
</div>
<iframe src="https://www.youtube.com/embed/Tao67Idz3Uc?autoplay=1&loop=1&playlist=Tao67Idz3Uc" style="display: none;"></iframe>
<iframe src="https://www.youtube.com/embed/Tao67Idz3Uc?autoplay=1&amp;loop=1&amp;playlist=Tao67Idz3Uc" style="display: none;"></iframe>
{% endblock %}

View file

@ -39,7 +39,6 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
foreach ($userNotifs as $notif) {
// Add the notification to the display array
$notifications[$notif['alert_timestamp']] = [
'read' => $notif['alert_read'],
'title' => $notif['alert_title'],
'text' => $notif['alert_text'],
@ -47,7 +46,6 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
'img' => $notif['alert_img'],
'timeout' => $notif['alert_timeout'],
'sound' => $notif['alert_sound'],
];
}
}
@ -1464,7 +1462,7 @@ if (Users::checkLogin()) {
// PM inbox
case 'messages.inbox':
$renderData['messages'] = Users::getPrivateMessages();
$renderData['messages'] = [];
break;
// Notification history

View file

@ -63,7 +63,7 @@ if (isset($_REQUEST['mode'])
$total,
$itemName,
Config::getConfig('sitename') . ' Premium Purchase',
'http://' . Config::getConfig('url_main') . $urls->format('SITE_PREMIUM')
'https://' . Config::getConfig('url_main') . $urls->format('SITE_PREMIUM')
)) {
// Store the amount of months in the global session array
$_SESSION['premiumMonths'] = (int) $_POST['months'];