From 4523ef87b7537546bce009b22ae077e8c1a9249d Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 23 Dec 2014 13:56:49 +0100 Subject: [PATCH] show correct errormessage when sql-prefix is wrong Signed-off-by: Michael Kaufmann (d00p) --- lib/functions/validate/function.checkUsername.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/functions/validate/function.checkUsername.php b/lib/functions/validate/function.checkUsername.php index f00ea977..fb3f6a8c 100644 --- a/lib/functions/validate/function.checkUsername.php +++ b/lib/functions/validate/function.checkUsername.php @@ -31,7 +31,11 @@ function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalue ) { $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK); } else { - $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'accountprefixiswrong'); + $errmsg = 'accountprefixiswrong'; + if ($fieldname == 'customer_mysqlprefix') { + $errmsg = 'mysqlprefixiswrong'; + } + $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, $errmsg); } return $returnvalue; }