Merge branch 'ent-11619-al-crear-nuevo-usuario-te-dice-que-estas-editando-el-tuyo' into 'develop'

Ent 11619 al crear nuevo usuario te dice que estas editando el tuyo

See merge request artica/pandorafms!6165
This commit is contained in:
Rafael Ameijeiras 2023-06-26 07:29:39 +00:00
commit c5bd2819c3
2 changed files with 5 additions and 5 deletions

View File

@ -201,8 +201,9 @@ if (is_metaconsole() === true) {
$buttons[$tab]['active'] = true;
}
$edit_user = get_parameter('edit_user');
ui_print_standard_header(
(empty($id) === false) ? sprintf('%s [ %s ]', __('Update User'), $id) : __('Create User'),
($edit_user) ? sprintf('%s [ %s ]', __('Update User'), $id) : __('Create User'),
'images/gm_users.png',
false,
'',
@ -385,9 +386,8 @@ if ($create_user === true) {
// Generate new API token.
$values['api_token'] = api_token_generate();
// Validate the user ID if it already exists.
$user_exists = get_user_info($id);
if (empty($id) === true) {
$user_exists = get_user_info($values['id_user']);
if (empty($values['id_user']) === true) {
ui_print_error_message(__('User ID cannot be empty'));
$is_err = true;
$user_info = $values;

View File

@ -143,7 +143,7 @@ if ($new_user === true) {
$userManagementTable->data['captions_iduser'][0] = __('User ID');
$userManagementTable->data['fields_iduser'][0] = html_print_input_text_extended(
'id_user',
$id,
'',
'',
'',
20,