Email not excepted

So I had this issue a while back it never was resolved. It seems that when someone creates an account, that the site sometimes will say there email is taken or not acceptable. I verify that the email is not in use, but yet it still says email is in use or not acceptable.

  • 668
  • More
Replies (1)
    • 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;

      Login or Join to comment.