We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d501af7 commit d2be861Copy full SHA for d2be861
main/admin/user_edit.php
@@ -421,7 +421,12 @@ function confirmation(name) {
421
$phone = $user['phone'];
422
$username = isset($user['username']) ? $user['username'] : $userInfo['username'];
423
$status = (int) $user['status'];
424
- $platform_admin = (int) $user['platform_admin'];
+ $platform_admin = 0;
425
+ // Only platform admin can change user status to admin.
426
+ if (api_is_platform_admin()) {
427
+ $platform_admin = (int) $user['platform_admin'];
428
+ }
429
+
430
$send_mail = (int) $user['send_mail'];
431
$reset_password = (int) $user['reset_password'];
432
$hr_dept_id = isset($user['hr_dept_id']) ? intval($user['hr_dept_id']) : null;
0 commit comments