From c08a6303f9372a393b19bd51dda44a98f90f5906 Mon Sep 17 00:00:00 2001 From: dignajar Date: Sun, 25 Oct 2015 17:27:24 -0300 Subject: [PATCH] Bug fixes, edit user --- admin/controllers/edit-user.php | 1 + admin/views/edit-user.php | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/controllers/edit-user.php b/admin/controllers/edit-user.php index 5b535be8..39a6bd7c 100644 --- a/admin/controllers/edit-user.php +++ b/admin/controllers/edit-user.php @@ -94,6 +94,7 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' ) } elseif( !empty($_POST['new-password']) && !empty($_POST['confirm-password']) ) { setPassword($_POST['username'], $_POST['new-password'], $_POST['confirm-password']); + editUser($_POST); } else { editUser($_POST); diff --git a/admin/views/edit-user.php b/admin/views/edit-user.php index b9afed03..6416e9b5 100644 --- a/admin/views/edit-user.php +++ b/admin/views/edit-user.php @@ -1,6 +1,6 @@ $L->g('Edit user'), 'icon'=>'user')); +HTML::title(array('title'=>$L->g('Edit user').' :: '.$_user['username'], 'icon'=>'user')); HTML::formOpen(array('class'=>'uk-form-horizontal')); @@ -34,7 +34,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'tip'=>'' )); -if($Login->username()==='admin') { +if($Login->role()==='admin') { HTML::formSelect(array( 'name'=>'role', @@ -79,14 +79,14 @@ if($Login->username()==='admin') { '; -if($Login->username()!=='admin') { +if( ($Login->role()==='admin') && ($_user['username']!='admin') ) { HTML::legend(array('value'=>$L->g('Delete'))); echo '
- - + +
';