Minor improvements
This commit is contained in:
parent
c3dc1d820d
commit
8ffc5aef97
|
@ -425,11 +425,8 @@ if ($create_user === true) {
|
|||
}
|
||||
}
|
||||
|
||||
// Generate a new API Token if user has login capability.
|
||||
if ($values['not_login'] === false) {
|
||||
// Generate new API token.
|
||||
$values['api_token'] = api_token_generate();
|
||||
}
|
||||
// Generate new API token.
|
||||
$values['api_token'] = api_token_generate();
|
||||
|
||||
if (empty($id) === true) {
|
||||
ui_print_error_message(__('User ID cannot be empty'));
|
||||
|
@ -901,7 +898,10 @@ if (!$new_user) {
|
|||
'content' => html_print_image(
|
||||
'images/icono-refrescar.png',
|
||||
true,
|
||||
['class' => 'renew_api_token_image clickable']
|
||||
[
|
||||
'class' => 'renew_api_token_image clickable',
|
||||
'title' => __('Renew API Token'),
|
||||
]
|
||||
),
|
||||
'class' => 'renew_api_token_link',
|
||||
],
|
||||
|
@ -918,7 +918,10 @@ if (!$new_user) {
|
|||
'content' => html_print_image(
|
||||
'images/eye_show.png',
|
||||
true,
|
||||
['class' => 'renew_api_token_image clickable']
|
||||
[
|
||||
'class' => 'renew_api_token_image clickable',
|
||||
'title' => __('Show API Token'),
|
||||
]
|
||||
),
|
||||
'class' => 'renew_api_token_link',
|
||||
],
|
||||
|
|
|
@ -905,7 +905,13 @@ function api_token_generate()
|
|||
*/
|
||||
function users_get_API_token(string $idUser)
|
||||
{
|
||||
return db_get_value('api_token', 'tusuario', 'id_user', $idUser);
|
||||
$output = db_get_value('api_token', 'tusuario', 'id_user', $idUser);
|
||||
|
||||
if (empty($output) === true) {
|
||||
$output = '<< '.__('NONE').' >>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -277,7 +277,10 @@ $user_id .= html_print_anchor(
|
|||
'content' => html_print_image(
|
||||
'images/icono-refrescar.png',
|
||||
true,
|
||||
['class' => 'renew_api_token_image clickable']
|
||||
[
|
||||
'class' => 'renew_api_token_image clickable',
|
||||
'title' => __('Renew API Token'),
|
||||
]
|
||||
),
|
||||
'class' => 'renew_api_token_link',
|
||||
],
|
||||
|
@ -294,7 +297,10 @@ $user_id .= html_print_anchor(
|
|||
'content' => html_print_image(
|
||||
'images/eye_show.png',
|
||||
true,
|
||||
['class' => 'renew_api_token_image clickable']
|
||||
[
|
||||
'class' => 'renew_api_token_image clickable',
|
||||
'title' => __('Show API Token'),
|
||||
]
|
||||
),
|
||||
'class' => 'renew_api_token_link',
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue