From 40aa825088731a49995be12c59ffff68b654e400 Mon Sep 17 00:00:00 2001 From: uid111856 Date: Thu, 23 Oct 2003 19:20:53 +0000 Subject: [PATCH] Added error-message if no profile could be created --- lam/templates/account/groupedit.php | 5 +++-- lam/templates/account/hostedit.php | 5 +++-- lam/templates/account/useredit.php | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lam/templates/account/groupedit.php b/lam/templates/account/groupedit.php index e0d0119b..32370338 100644 --- a/lam/templates/account/groupedit.php +++ b/lam/templates/account/groupedit.php @@ -440,8 +440,9 @@ do { // X-Or, only one if() can be true if ($_POST['f_finish_safeProfile']=='') $errors[] = array('ERROR', _('Save profile'), _('No profilename given.')); else { - saveGroupProfile($account_new, $_POST['f_finish_safeProfile']); - $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + if (saveGroupProfile($account_new, $_POST['f_finish_safeProfile'])) + $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + else $errors[] = array('ERROR', _('Save profile'), _('Wrong profilename given.')); } // select last page displayed before user is created $select_local='final'; diff --git a/lam/templates/account/hostedit.php b/lam/templates/account/hostedit.php index 06c90eca..961cd0f8 100644 --- a/lam/templates/account/hostedit.php +++ b/lam/templates/account/hostedit.php @@ -272,8 +272,9 @@ do { // X-Or, only one if() can be true if ($_POST['f_finish_safeProfile']=='') $errors[] = array('ERROR', _('Save profile'), _('No profilename given.')); else { - saveHostProfile($account_new, $_POST['f_finish_safeProfile']); - $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + if (saveHostProfile($account_new, $_POST['f_finish_safeProfile'])) + $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + else $errors[] = array('ERROR', _('Save profile'), _('Wrong profilename given.')); } break; } diff --git a/lam/templates/account/useredit.php b/lam/templates/account/useredit.php index 5b9a0e44..edc276f3 100644 --- a/lam/templates/account/useredit.php +++ b/lam/templates/account/useredit.php @@ -704,8 +704,9 @@ do { // X-Or, only one if() can be true if ($_POST['f_finish_safeProfile']=='') $errors[] = array('ERROR', _('Save profile'), _('No profilename given.')); else { - saveUSerProfile($account_new, $_POST['f_finish_safeProfile']); - $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + if (saveUserProfile($account_new, $_POST['f_finish_safeProfile'])) + $errors[] = array('INFO', _('Save profile'), _('New profile created.')); + else $errors[] = array('ERROR', _('Save profile'), _('Wrong profilename given.')); } // select last page displayed before user is created $select_local='final';