aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-04-29 09:32:02 +0000
committerMax Kostikov <max@kostikov.co>2021-04-29 09:32:02 +0000
commit0cbdeb7bf16f1fb0d03038dd5af324b7cdd7e850 (patch)
tree2229673706f8c83d4f4789b68c339b78a8c3b299 /include
parent61cf92ebddcad92d79d831178d3c7c9ed58d62e9 (diff)
parent6be464ef8484063690840e6b06e7540f7416788a (diff)
downloadvolse-hubzilla-0cbdeb7bf16f1fb0d03038dd5af324b7cdd7e850.tar.gz
volse-hubzilla-0cbdeb7bf16f1fb0d03038dd5af324b7cdd7e850.tar.bz2
volse-hubzilla-0cbdeb7bf16f1fb0d03038dd5af324b7cdd7e850.zip
Merge branch 'dev' into 'dev'
Dev Sync See merge request kostikov/core!1
Diffstat (limited to 'include')
-rw-r--r--include/account.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/account.php b/include/account.php
index 349c6cfee..4c5437594 100644
--- a/include/account.php
+++ b/include/account.php
@@ -35,15 +35,20 @@ function check_account_email($email) {
return $result;
if(! validate_email($email))
- $result['message'] .= t('Email address not valid') . EOL;
+ $result['message'] = t('The provided email address is not valid') . EOL;
elseif(! allowed_email($email))
- $result['message'] = t('Your email domain is not among those allowed on this site');
+ $result['message'] = t('The provided email domain is not among those allowed on this site');
else {
$r = q("select account_email from account where account_email = '%s' limit 1",
dbesc($email)
);
+ if (!$r) {
+ $r = q("select reg_did2 from register where reg_did2 = '%s' limit 1",
+ dbesc($email)
+ );
+ }
if($r) {
- $result['message'] .= t('Your email address is already registered at this site.');
+ $result['message'] = t('The provided email address is already registered at this site');
}
}
if($result['message'])
@@ -1195,8 +1200,15 @@ function get_account_techlevel($account_id = 0) {
}
function zar_log($msg='') {
- file_put_contents('./zar.log',
- date('Y-m-d_H:i:s') . ' ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §' . "\n", FILE_APPEND);
+
+ if(get_config('system', 'register_logfile', 0)) {
+ file_put_contents('./zar.log',
+ date('Y-m-d_H:i:s') . ' ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §' . "\n", FILE_APPEND);
+ }
+ else {
+ logger('zar_log: ' . $msg . ', ip: § ' . $_SERVER['REMOTE_ADDR'] . ' §');
+ }
+
return;
}