From b41405ea09e59830cbb949e906a70d04dec45870 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 8 Jul 2013 10:24:34 +0000 Subject: [PATCH] Make operator's email field required --- src/messenger/webim/operator/operator.php | 3 ++- src/messenger/webim/view/agent.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/messenger/webim/operator/operator.php b/src/messenger/webim/operator/operator.php index e764a00e..f20a78a7 100644 --- a/src/messenger/webim/operator/operator.php +++ b/src/messenger/webim/operator/operator.php @@ -52,8 +52,9 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse $errors[] = getlocal("page_agent.error.wrong_login"); } - if ($email != '' && !is_valid_email($email)) + if ($email == '' || !is_valid_email($email)) { $errors[] = wrong_field("form.field.mail"); + } if ($code != '' && (! preg_match("/^[A-z0-9_]+$/", $code))) { $errors[] = getlocal("page_agent.error.wrong_agent_code"); diff --git a/src/messenger/webim/view/agent.php b/src/messenger/webim/view/agent.php index 1276b564..282c4096 100644 --- a/src/messenger/webim/view/agent.php +++ b/src/messenger/webim/view/agent.php @@ -63,7 +63,7 @@ require_once('inc_errors.php');
-
+
*
/>