koblog/bl-kernel/admin/controllers/edit-user.php

29 lines
896 B
PHP
Raw Normal View History

2015-05-05 01:00:01 +00:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-05-14 22:07:45 +00:00
// ============================================================================
// Authorization
2015-05-14 22:07:45 +00:00
// ============================================================================
2015-08-02 21:49:12 -03:00
// ============================================================================
// Functions
2015-05-14 22:07:45 +00:00
// ============================================================================
// ============================================================================
// Main
2015-05-14 22:07:45 +00:00
// ============================================================================
2018-07-25 23:42:00 +02:00
$username = $layout['parameters'];
// Prevent non-administrators to change other users
if ($login->role()!=='admin') {
2018-07-25 23:42:00 +02:00
$username = $login->username();
2015-05-05 01:00:01 +00:00
}
2018-07-25 23:42:00 +02:00
try {
$user = new User($username);
} catch (Exception $e) {
Redirect::page('users');
2015-05-14 22:07:45 +00:00
}
// HTML <title>
$layout['title'] = $L->g('Edit user') . ' - ' . $layout['title'];