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 '
- - + +
';