Revise user-password.php - Admin folder rename
Add variable in bl-kernel/boot/init.php that allows User to rename bl-kernel/admin folder. User can then define variable in bl-kernel/boot/init.php and change the foldername itself to effect the rename. Add global $adminfolder as necessary and replace relevant 'admin' strings with $adminfolder. Applies to most of the files in bl-kernel/admin/controllers. Line 40 - Reference Admin folder variable global $adminfolder; Line 55 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'users'); Original: Redirect::page('admin', 'users'); Line 71 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'users'); Original: Redirect::page('admin', 'users')
This commit is contained in:
parent
bd5440c0d7
commit
6931a53030
@ -37,10 +37,11 @@ function setPassword($username, $new_password, $confirm_password)
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
global $adminfolder;
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
// Prevent editors to administrate other users.
|
||||
@ -51,7 +52,7 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
}
|
||||
|
||||
if( setPassword($_POST['username'], $_POST['new_password'], $_POST['confirm_password']) ) {
|
||||
Redirect::page('admin', 'users');
|
||||
Redirect::page($adminfolder, 'users');
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +68,7 @@ $_user = $dbUsers->getDb($layout['parameters']);
|
||||
|
||||
// If the user doesn't exist, redirect to the users list.
|
||||
if($_user===false) {
|
||||
Redirect::page('admin', 'users');
|
||||
Redirect::page($adminfolder, 'users');
|
||||
}
|
||||
|
||||
$_user['username'] = $layout['parameters'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user