diff --git a/kernel/admin/controllers/edit-user.php b/kernel/admin/controllers/edit-user.php index 6b85671d..8dfaf909 100644 --- a/kernel/admin/controllers/edit-user.php +++ b/kernel/admin/controllers/edit-user.php @@ -85,11 +85,9 @@ if($Login->role()!=='admin') { $layout['parameters'] = $Login->username(); } -$_user = $dbUsers->getDb($layout['parameters']); +$_User = $dbUsers->getUser($layout['parameters']); // If the user doesn't exist, redirect to the users list. -if($_user===false) { +if($_User===false) { Redirect::page('admin', 'users'); } - -$_user['username'] = $layout['parameters']; diff --git a/kernel/admin/themes/default/css/default.css b/kernel/admin/themes/default/css/default.css index 8ce47fe4..8cd02bac 100644 --- a/kernel/admin/themes/default/css/default.css +++ b/kernel/admin/themes/default/css/default.css @@ -272,6 +272,8 @@ button.delete-button:hover { } +/* ----------- BLUDIT PROFILE PICTURE ----------- */ + /* ----------- LOGIN FORM ----------- */ div.login-box > h1 { diff --git a/kernel/admin/views/edit-user.php b/kernel/admin/views/edit-user.php index 5ef805bc..de550f9f 100644 --- a/kernel/admin/views/edit-user.php +++ b/kernel/admin/views/edit-user.php @@ -16,7 +16,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal // Security token HTML::formInputHidden(array( 'name'=>'username', - 'value'=>$_user['username'] + 'value'=>$_User->username() )); HTML::legend(array('value'=>$L->g('Profile'), 'class'=>'first-child')); @@ -24,7 +24,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal HTML::formInputText(array( 'name'=>'usernameDisable', 'label'=>$L->g('Username'), - 'value'=>$_user['username'], + 'value'=>$_User->username(), 'class'=>'uk-width-1-2 uk-form-medium', 'disabled'=>true, 'tip'=>'' @@ -33,7 +33,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal HTML::formInputText(array( 'name'=>'firstName', 'label'=>$L->g('First name'), - 'value'=>$_user['firstName'], + 'value'=>$_User->firstName(), 'class'=>'uk-width-1-2 uk-form-medium', 'tip'=>'' )); @@ -41,7 +41,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal HTML::formInputText(array( 'name'=>'lastName', 'label'=>$L->g('Last name'), - 'value'=>$_user['lastName'], + 'value'=>$_User->lastName(), 'class'=>'uk-width-1-2 uk-form-medium', 'tip'=>'' )); @@ -49,7 +49,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal echo '
'; @@ -59,7 +59,7 @@ if($Login->role()==='admin') { 'name'=>'role', 'label'=>$L->g('Role'), 'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), - 'selected'=>$_user['role'], + 'selected'=>$_User->role(), 'tip'=>'' )); @@ -67,17 +67,41 @@ if($Login->role()==='admin') { HTML::formInputText(array( 'name'=>'email', 'label'=>$L->g('Email'), - 'value'=>$_user['email'], + 'value'=>$_User->email(), 'class'=>'uk-width-1-2 uk-form-medium', 'tip'=>$L->g('email-will-not-be-publicly-displayed') )); - HTML::legend(array('value'=>$L->g('Social network'))); + HTML::legend(array('value'=>'Social networks')); HTML::formInputText(array( 'name'=>'twitterUsername', - 'label'=>$L->g('Twitter username'), - 'value'=>$_user['twitterUsername'], + 'label'=>'Twitter username', + 'value'=>$_User->twitterUsername(), + 'class'=>'uk-width-1-2 uk-form-medium', + 'tip'=>'' + )); + + HTML::formInputText(array( + 'name'=>'facebookUsername', + 'label'=>'Facebook username', + 'value'=>$_User->facebookUsername(), + 'class'=>'uk-width-1-2 uk-form-medium', + 'tip'=>'' + )); + + HTML::formInputText(array( + 'name'=>'googleUsername', + 'label'=>'Google username', + 'value'=>$_User->googleUsername(), + 'class'=>'uk-width-1-2 uk-form-medium', + 'tip'=>'' + )); + + HTML::formInputText(array( + 'name'=>'instagramUsername', + 'label'=>'Instagram username', + 'value'=>$_User->instagramUsername(), 'class'=>'uk-width-1-2 uk-form-medium', 'tip'=>'' )); @@ -89,7 +113,7 @@ if($Login->role()==='admin') { '; -if( ($Login->role()==='admin') && ($_user['username']!='admin') ) { +if( ($Login->role()==='admin') && ($_User->username()!='admin') ) { HTML::legend(array('value'=>$L->g('Delete'))); @@ -108,15 +132,15 @@ echo ''; echo '