UM unregister restriction, only admins
This commit is contained in:
parent
4a60dbe415
commit
5e3ca1664f
|
@ -29,6 +29,8 @@
|
||||||
// Begin.
|
// Begin.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
require_once __DIR__.'/../../include/functions_users.php';
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
|
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
|
||||||
|
@ -43,6 +45,7 @@ $action_update_url_update_manager = (bool) get_parameter(
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (users_is_admin()) {
|
||||||
$update_manager_disconnect = get_parameter(
|
$update_manager_disconnect = get_parameter(
|
||||||
'um_disconnect_console',
|
'um_disconnect_console',
|
||||||
0
|
0
|
||||||
|
@ -54,6 +57,7 @@ if ($update_manager_disconnect) {
|
||||||
'OFFLINE'
|
'OFFLINE'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$action_update_url_update_manager) {
|
if (!$action_update_url_update_manager) {
|
||||||
$url_update_manager = get_parameter('url_update_manager', $config['url_update_manager']);
|
$url_update_manager = get_parameter('url_update_manager', $config['url_update_manager']);
|
||||||
|
@ -236,7 +240,7 @@ $table->data[4][1] = html_print_input_password(
|
||||||
$table->data[5][0] = __('Registration ID:');
|
$table->data[5][0] = __('Registration ID:');
|
||||||
$table->data[5][1] = '<i>'.$config['pandora_uid'].'</i>';
|
$table->data[5][1] = '<i>'.$config['pandora_uid'].'</i>';
|
||||||
|
|
||||||
if (update_manager_verify_registration() === true) {
|
if (update_manager_verify_registration() === true && users_is_admin()) {
|
||||||
$table->data[6][0] = __('Cancel registration:');
|
$table->data[6][0] = __('Cancel registration:');
|
||||||
$table->data[6][1] = '<a href="';
|
$table->data[6][1] = '<a href="';
|
||||||
$table->data[6][1] .= ui_get_full_url(
|
$table->data[6][1] .= ui_get_full_url(
|
||||||
|
|
Loading…
Reference in New Issue