koblog/bl-kernel/admin/controllers/edit-user.php
Vadim Ushakov 387e62ea7e Display the user name in the title of page /admin/edit-user/$username
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`.
2022-09-19 15:43:48 +07:00

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