Merge branch '2900-Mensajes-de-Error-y-Success-al-mismo-tiempo-en-la-edición-de-usuarios_2' into 'develop'
Display an error message when no changes have been made - #2900 See merge request artica/pandorafms!1948
This commit is contained in:
commit
7afc328e50
|
@ -160,7 +160,9 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
// message could be confussing to the user.
|
||||
|
||||
if($return){
|
||||
$success_msg = __('Password successfully updated');
|
||||
if(!empty($password_new) && !empty($password_confirm)){
|
||||
$success_msg = __('Password successfully updated');
|
||||
}
|
||||
|
||||
$return_update_user = update_user ($id, $upd_info);
|
||||
|
||||
|
@ -170,6 +172,15 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
elseif($return_update_user == true){
|
||||
$success_msg = __('User info successfully updated');
|
||||
}
|
||||
else{
|
||||
if(!empty($password_new) && !empty($password_confirm)){
|
||||
$success_msg = __('Password successfully updated');
|
||||
}
|
||||
else{
|
||||
$return=false;
|
||||
$error_msg = __('No changes have been made');
|
||||
}
|
||||
}
|
||||
|
||||
$user_info = $upd_info;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue