Merge branch 'ent-10326-bearer-token-permite-conectar-con-pandora1234-por-defecto' into 'develop'
Ent 10326 bearer token permite conectar con pandora1234 por defecto See merge request artica/pandorafms!5782
This commit is contained in:
commit
2db1eddc11
|
@ -682,6 +682,10 @@ if ($update_user) {
|
|||
]
|
||||
);
|
||||
$res3 = save_pass_history($id, $password_new);
|
||||
|
||||
// Generate new API token.
|
||||
$newToken = api_token_generate();
|
||||
$res4 = update_user($id, ['api_token' => $newToken]);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
|
@ -706,6 +710,10 @@ if ($update_user) {
|
|||
'utimestamp' => time(),
|
||||
]
|
||||
);
|
||||
|
||||
// Generate new API token.
|
||||
$newToken = api_token_generate();
|
||||
$res4 = update_user($id, ['api_token' => $newToken]);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
|
|
|
@ -9612,6 +9612,7 @@ function api_set_new_user($id, $thrash2, $other, $thrash3)
|
|||
$values['section'] = $other['data'][11];
|
||||
$values['session_time'] = $other['data'][12];
|
||||
$values['metaconsole_access_node'] = $other['data'][13];
|
||||
$values['api_token'] = api_token_generate();
|
||||
|
||||
if (empty($password) === true) {
|
||||
returnError('Password cannot be empty.');
|
||||
|
@ -9708,6 +9709,8 @@ function api_set_update_user($id, $thrash2, $other, $thrash3)
|
|||
if (!update_user_password($id, $other['data'][4])) {
|
||||
returnError('The user could not be updated. Password info incorrect.');
|
||||
return;
|
||||
} else {
|
||||
$values['api_token'] = api_token_generate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue