Comment to 'Email not excepted'
  • Hello @Discover Me 360 (DM3) !

    Both points should be checked separately. The first one can be looked through the sys_accounts table. If there is no such email then it needs to check the view then it needs to review the email itself - maybe it's not accepted by the common Regex rules of the email validator:

    static public function checkEmail($s)

        {

            if (false === strpos($s, '@') || strpos($s, '@') != strrpos($s, '@')) // simple check

                return false;

            if (!preg_match("/^[\pL\pNd]/u", $s)) // must start with letter or number

                return false;

            if (!preg_match("/@[\pL\pNd\.\-]+$/u", $s)) // validate domain

                return false;

            if (!getParam('sys_account_allow_plus_in_email') && false !== strpos($s, '+'))

                return false;

            $s = str_replace(array('@', '.', '-', '+', '_'), '', $s); // allowed symbols

            if (preg_match("/[^\pL^\pNd]/u", $s)) // check for undesirable chars

                return false;

            return true;