Changes of the last few months including restructuring system from using only ranks to permissions
This commit is contained in:
@@ -499,14 +499,17 @@ class User extends MY_Controller
|
||||
$_SESSION['profileEditNotification'] .= "<div class='alert alert-danger' role='alert'><b>Bitte gib dein Passwort ein!</b> Das Ändern der E-Mail-Adresse ist ein tiefgreifender Eingriff in den Account. Daher benötigen wir zur Sicherheit nochmal dein Passwort.</div>";
|
||||
}
|
||||
}
|
||||
|
||||
// Notifications
|
||||
if (isset($_POST['email-notifications'])) {
|
||||
$newData['receiveEmails'] = filter_var($_POST['email-notifications'], FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
// Newsletter
|
||||
if (isset($_POST['newsletter'])) {
|
||||
$newData['receiveNewsletter'] = filter_var($_POST['newsletter'], FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
// Password
|
||||
if (isset($_POST['passwordNew'])) {
|
||||
if (isset($_POST['passwordOld'])) {
|
||||
@@ -536,7 +539,7 @@ class User extends MY_Controller
|
||||
}
|
||||
}
|
||||
if (isset($_POST['showAds'])) {
|
||||
if (isset($_SESSION['user']) && $_SESSION['user']['rank'] >= 2) {
|
||||
if ($this->hasPermission('user.disableAds')) {
|
||||
$newData['showAds'] = filter_var($_POST['email-notifications'], FILTER_VALIDATE_BOOLEAN);
|
||||
} else {
|
||||
$_SESSION['profileEditNotification'] .= "<div class='alert alert-danger' role='alert'><b>Du bist dazu nicht berechtigt!</b> Um diese Einstellung zu verändern, musst du mindestens ein Premium-Nutzer oder höher sein!</div>";
|
||||
|
Reference in New Issue
Block a user