related to #2158 update user and guest pop in

- Implementation of a new modal for modifying a user or guest
- Addition of a function to allow plugins to add a tab to the new user modal
- Fix bug: "badger-number" is updated when a user is added or deleted
- Fix bug: When the user who is editing has permissions to delete the user he is modifying, the delete icon is now displayed correctly
- Added a new api method for modifying the main user and generating a link to reset a password
- Passed $conf[‘webmaster_id’] in database configuration
This commit is contained in:
Linty
2024-05-31 18:03:53 +02:00
parent 158e99573b
commit 27cd5cde9e
26 changed files with 2144 additions and 467 deletions
+36
View File
@@ -1453,6 +1453,42 @@ enabled_high, registration_date, registration_date_string, registration_date_sin
'',
$ws_functions_root . 'pwg.images.php'
);
$service->addMethod(
'pwg.users.generateResetPasswordLink',
'ws_users_generate_reset_password_link',
array(
'user_id' => array(
'type'=>WS_TYPE_ID
),
'pwg_token' => array(),
'send_by_mail' => array(
'flags' => WS_PARAM_OPTIONAL,
'type' => WS_TYPE_BOOL,
'default' => false,
),
),
'Return the reset password link <br />
(Only webmaster can perform this action for another webmaster)',
$ws_functions_root . 'pwg.users.php',
array('admin_only'=>true)
);
$service->addMethod(
'pwg.users.setMainUser',
'ws_set_main_user',
array(
'user_id' => array(
'type'=>WS_TYPE_ID
),
'pwg_token' => array(),
),
'Update the main user (owner) <br />
- To be the main user, the user must have the status "webmaster".<br />
- Only a webmaster can perform this action',
$ws_functions_root . 'pwg.users.php',
array('admin_only'=>true, 'post_only'=>true)
);
}
?>