aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/class/controlleruser.php2
-rw-r--r--app/view/templates/backtopbar.php3
2 files changed, 2 insertions, 3 deletions
diff --git a/app/class/controlleruser.php b/app/class/controlleruser.php
index 792877d..7863956 100644
--- a/app/class/controlleruser.php
+++ b/app/class/controlleruser.php
@@ -61,7 +61,7 @@ class Controlleruser extends Controller
$user->hydrate($_POST);
if(empty($user->id())) {
$this->routedirectget('user', ['error' => 'wrong_id']);
- } elseif (empty($user->password()) | $this->usermanager->passwordexist($user->password())) {
+ } elseif (!empty($_POST['password']) && (empty($user->password()) || $this->usermanager->passwordexist($user->password()))) {
$this->routedirectget('user', ['error' => 'change_password']);
} elseif (empty($user->level())) {
$this->routedirectget('user', ['error' => 'wrong_level']);
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php
index 91a2a2c..78e9181 100644
--- a/app/view/templates/backtopbar.php
+++ b/app/view/templates/backtopbar.php
@@ -22,7 +22,7 @@
<?php } else { ?>
<span>
-<?= $user->id() ?> <i><?= $user->level() ?></i>
+<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><?= $user->id() ?></a> <i><?= $user->level() ?></i>
</span>
@@ -48,7 +48,6 @@
<?php
if($user->isadmin()) {
?>
-<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>>user</a>
<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>>admin</a>
<?php
}