Skip to content

Commit 4084a38

Browse files
committed
No role selfchange :)
1 parent 2f7b174 commit 4084a38

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/settings/user-self-edit-submit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
elseif (strlen($_POST['password'])<8) { $Result->show("danger", "Invalid password - 8 characters required!", true); }
6161
else { $_POST['password'] = $User->crypt_user_pass ($_POST['password']); }
6262

63+
// no role change
64+
if(isset($_POST['role'])) { unset($_POST['role']); }
65+
6366

6467
// add action
6568
$_POST['action'] = "edit";

app/settings/users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
if($fields_db!==false) {
2929
foreach ($fields_db as $f) {
3030
// no id
31-
if($f->Field!=="id" && $f->Field!=="password" && $f->Field!=="last_activity") {
31+
if($f->Field!=="id" && $f->Field!=="password" && $f->Field!=="last_activity" && $f->Field!=="reload_page") {
3232
$tfields[] = $f->Field;
3333
}
3434
}

0 commit comments

Comments
 (0)