includes/sessions.php
changeset 504 bc8e0e9ee01d
parent 499 6b7fdd898ba3
child 507 586fd7d3202d
equal deleted inserted replaced
503:f205f4b201ed 504:bc8e0e9ee01d
  2267         $strs[] = 'password=\''.$encpass.'\'';
  2267         $strs[] = 'password=\''.$encpass.'\'';
  2268       }
  2268       }
  2269       // E-mail addy
  2269       // E-mail addy
  2270       if(is_string($email))
  2270       if(is_string($email))
  2271       {
  2271       {
  2272         // I didn't write this regex.
  2272         if(!check_email_address($email))
  2273         if(!preg_match('/^(?:[\w\d]+\.?)+@((?:(?:[\w\d]\-?)+\.)+\w{2,4}|localhost)$/', $email))
       
  2274           $errors[] = 'The e-mail address you entered is invalid.';
  2273           $errors[] = 'The e-mail address you entered is invalid.';
  2275         $strs[] = 'email=\''.$db->escape($email).'\'';
  2274         $strs[] = 'email=\''.$db->escape($email).'\'';
  2276       }
  2275       }
  2277     }
  2276     }
  2278     // Real name
  2277     // Real name