Bug fixes, edit user
This commit is contained in:
parent
f6ecbdcf4e
commit
c08a6303f9
|
@ -94,6 +94,7 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||||
}
|
}
|
||||||
elseif( !empty($_POST['new-password']) && !empty($_POST['confirm-password']) ) {
|
elseif( !empty($_POST['new-password']) && !empty($_POST['confirm-password']) ) {
|
||||||
setPassword($_POST['username'], $_POST['new-password'], $_POST['confirm-password']);
|
setPassword($_POST['username'], $_POST['new-password'], $_POST['confirm-password']);
|
||||||
|
editUser($_POST);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
editUser($_POST);
|
editUser($_POST);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
HTML::title(array('title'=>$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'));
|
HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
|
||||||
if($Login->username()==='admin') {
|
if($Login->role()==='admin') {
|
||||||
|
|
||||||
HTML::formSelect(array(
|
HTML::formSelect(array(
|
||||||
'name'=>'role',
|
'name'=>'role',
|
||||||
|
@ -79,14 +79,14 @@ if($Login->username()==='admin') {
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
if($Login->username()!=='admin') {
|
if( ($Login->role()==='admin') && ($_user['username']!='admin') ) {
|
||||||
|
|
||||||
HTML::legend(array('value'=>$L->g('Delete')));
|
HTML::legend(array('value'=>$L->g('Delete')));
|
||||||
|
|
||||||
echo '<div class="uk-form-row">
|
echo '<div class="uk-form-row">
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate">'.$L->g('Delete the user and associate its posts to admin user').'</button>
|
<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate"><i class="uk-icon-ban"></i> '.$L->g('Delete the user and associate its posts to admin user').'</button>
|
||||||
<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all">'.$L->g('Delete the user and all its posts').'</button>
|
<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all"><i class="uk-icon-ban"></i> '.$L->g('Delete the user and all its posts').'</button>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue