core_second/functions/functions.input.php
/* Ensure that $mail is not empty, valid and not used in database by another user */
Ensure that $mail is not empty, valid and not used in database by another user
Ensure that $mail is not empty valid and not used in database by another user
function check_mails($mail, $checkmail, $config, $dbsocket)
{
  if(filled($mail) AND filled($checkmail))
  {
    if(same_inputs($mail, $checkmail))
    {
      if(valid_mail($mail))
      {
        if(!user_exists('mail', $mail, $dbsocket))
        {
          return true;
        }
        else
        {
          return "<span class=\"error_msg\">Le mail est déjà utilisé ! </span><br/>";
        }
      }
      else
      {
        return "<span class=\"error_msg\">Le mail est invalide ! </span><br/>";
      }
    }
    else
    {
      return "<span class=\"error_msg\">Les mails ne sont pas identiques ! </span><br/>";
    }
  }
  else
  {
    return "<span class=\"error_msg\"> Les mails doivent être remplis ! </span><br/>";
  }
}
function check_mails ( $ mail , $ checkmail , $ config , $ dbsocket ) { if ( filled ( $ mail ) AND filled ( $ checkmail ) ) { if ( same_inputs ( $ mail , $ checkmail ) ) { if ( valid_mail ( $ mail ) ) { if ( ! user_exists ( 'mail' , $ mail , $ dbsocket ) ) { return true ; } else { return " <span class= \" error_msg \" >Le mail est déjà utilisé ! </span><br/>"; } } else { return " <span class= \" error_msg \" >Le mail est invalide ! </span><br/> " ; } } else { return " <span class= \" error_msg \" >Les mails ne sont pas identiques ! </span><br/> " ; } } else { return " <span class= \" error_msg \" > Les mails doivent être remplis ! </span><br/>" ; } }
Ensure that $mail is not empty, valid and not used in database by another user
Ensure that $mail is not empty valid and not used in database by another user