]> git.mxchange.org Git - friendica.git/commitdiff
Format valid_email function in include/text
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 13 Dec 2017 01:52:28 +0000 (20:52 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 13 Dec 2017 01:52:28 +0000 (20:52 -0500)
include/text.php

index d25b41ae888669431e999a080d4170ab61060aa1..b246623a3a984d84c8c63736d6de2709fbdfb3d7 100644 (file)
@@ -1068,17 +1068,14 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
 }
 
 /**
- * Check if $x is a valid email string
+ * @brief Check for a valid email string
  *
- * @param string $x
+ * @param string $email_address
  * @return boolean
  */
-function valid_email($x){
-
-       /// @TODO Removed because Fabio told me so.
-       //if (Config::get('system','disable_email_validation'))
-       //      return true;
-       return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $x);
+function valid_email($email_address)
+{
+       return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $email_address);
 }