aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-01 18:56:00 -0700
committerfriendica <info@friendica.com>2012-07-01 18:56:00 -0700
commitdd71f9446b05274550ebcb3ce4773762832084e3 (patch)
tree0901858977a643278a1cabb0aebc36bd5e6a1bf3 /include
parent696d78d6581a77cff44cbf558930c519d9ec0413 (diff)
downloadvolse-hubzilla-dd71f9446b05274550ebcb3ce4773762832084e3.tar.gz
volse-hubzilla-dd71f9446b05274550ebcb3ce4773762832084e3.tar.bz2
volse-hubzilla-dd71f9446b05274550ebcb3ce4773762832084e3.zip
config to disable email validation
Diffstat (limited to 'include')
-rw-r--r--include/network.php3
-rw-r--r--include/text.php4
-rw-r--r--include/user.php4
3 files changed, 9 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index c1a76000e..9e6f8355b 100644
--- a/include/network.php
+++ b/include/network.php
@@ -607,6 +607,9 @@ function validate_url(&$url) {
if(! function_exists('validate_email')) {
function validate_email($addr) {
+ if(get_config('system','disable_email_validation'))
+ return true;
+
if(! strpos($addr,'@'))
return false;
$h = substr($addr,strpos($addr,'@') + 1);
diff --git a/include/text.php b/include/text.php
index 3b0050d38..c3558c641 100644
--- a/include/text.php
+++ b/include/text.php
@@ -656,6 +656,10 @@ function search($s,$id='search-box',$url='/search',$save = false) {
if(! function_exists('valid_email')) {
function valid_email($x){
+
+ if(get_config('system','disable_email_validation'))
+ return true;
+
if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
return true;
return false;
diff --git a/include/user.php b/include/user.php
index 383a3b3e1..039b30bbd 100644
--- a/include/user.php
+++ b/include/user.php
@@ -99,11 +99,11 @@ function create_user($arr) {
if(! allowed_email($email))
- $result['message'] .= t('Your email domain is not among those allowed on this site.') . EOL;
+ $result['message'] .= t('Your email domain is not among those allowed on this site.') . EOL;
if((! valid_email($email)) || (! validate_email($email)))
$result['message'] .= t('Not a valid email address.') . EOL;
-
+
// Disallow somebody creating an account using openid that uses the admin email address,
// since openid bypasses email verification. We'll allow it if there is not yet an admin account.