Display the user name in the title of page `/admin/edit-user/$username`, in the same way as it's implemented for `/admin/edit-category/$category`.
29 lines
No EOL
924 B
PHP
29 lines
No EOL
924 B
PHP
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
// ============================================================================
|
|
// Authorization
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Functions
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Main
|
|
// ============================================================================
|
|
|
|
$username = $layout['parameters'];
|
|
|
|
// Prevent non-administrators to change other users
|
|
if ($login->role()!=='admin') {
|
|
$username = $login->username();
|
|
}
|
|
|
|
try {
|
|
$user = new User($username);
|
|
} catch (Exception $e) {
|
|
Redirect::page('users');
|
|
}
|
|
|
|
// HTML <title>
|
|
$layout['title'] = $L->g('Edit user') . ' [ ' . $username . ' ] ' . ' - ' . $layout['title']; |