small amount of changes that isn't worth mentioning
This commit is contained in:
parent
cfa1326824
commit
b5809d5fe8
4 changed files with 3 additions and 54 deletions
|
@ -571,37 +571,6 @@ class Users
|
||||||
return [1, 'SUCCESS'];
|
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
|
// Check if registration code is valid
|
||||||
public static function checkRegistrationCode($code)
|
public static function checkRegistrationCode($code)
|
||||||
{
|
{
|
||||||
|
@ -1008,18 +977,6 @@ class Users
|
||||||
return $ranks;
|
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
|
// Get a user's notifications
|
||||||
public static function getNotifications($uid = null, $timediff = 0, $excludeRead = true, $markRead = false)
|
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
|
// Get friends
|
||||||
public static function getFriends($uid = null, $timestamps = false, $getData = false, $checkOnline = false)
|
public static function getFriends($uid = null, $timestamps = false, $getData = false, $checkOnline = false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,5 +27,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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&loop=1&playlist=Tao67Idz3Uc" style="display: none;"></iframe>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -39,7 +39,6 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
|
||||||
foreach ($userNotifs as $notif) {
|
foreach ($userNotifs as $notif) {
|
||||||
// Add the notification to the display array
|
// Add the notification to the display array
|
||||||
$notifications[$notif['alert_timestamp']] = [
|
$notifications[$notif['alert_timestamp']] = [
|
||||||
|
|
||||||
'read' => $notif['alert_read'],
|
'read' => $notif['alert_read'],
|
||||||
'title' => $notif['alert_title'],
|
'title' => $notif['alert_title'],
|
||||||
'text' => $notif['alert_text'],
|
'text' => $notif['alert_text'],
|
||||||
|
@ -47,7 +46,6 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
|
||||||
'img' => $notif['alert_img'],
|
'img' => $notif['alert_img'],
|
||||||
'timeout' => $notif['alert_timeout'],
|
'timeout' => $notif['alert_timeout'],
|
||||||
'sound' => $notif['alert_sound'],
|
'sound' => $notif['alert_sound'],
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1464,7 +1462,7 @@ if (Users::checkLogin()) {
|
||||||
|
|
||||||
// PM inbox
|
// PM inbox
|
||||||
case 'messages.inbox':
|
case 'messages.inbox':
|
||||||
$renderData['messages'] = Users::getPrivateMessages();
|
$renderData['messages'] = [];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Notification history
|
// Notification history
|
||||||
|
|
|
@ -63,7 +63,7 @@ if (isset($_REQUEST['mode'])
|
||||||
$total,
|
$total,
|
||||||
$itemName,
|
$itemName,
|
||||||
Config::getConfig('sitename') . ' Premium Purchase',
|
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
|
// Store the amount of months in the global session array
|
||||||
$_SESSION['premiumMonths'] = (int) $_POST['months'];
|
$_SESSION['premiumMonths'] = (int) $_POST['months'];
|
||||||
|
|
Reference in a new issue