mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
input the admin email address during install/setup.
This commit is contained in:
parent
d99dfbe4ef
commit
2d2b500639
11 changed files with 33 additions and 13 deletions
|
@ -103,10 +103,15 @@ function register_post(&$a) {
|
|||
$err .= 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.
|
||||
// since openid bypasses email verification. We'll allow it if there is not yet an admin account.
|
||||
|
||||
if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0) && strlen($openid_url))
|
||||
$err .= t('Cannot use that email.') . EOL;
|
||||
if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0) && strlen($openid_url)) {
|
||||
$r = q("SELECT * FROM `user` WHERE `email` = '%s' LIMIT 1",
|
||||
dbesc($email)
|
||||
);
|
||||
if(count($r))
|
||||
$err .= t('Cannot use that email.') . EOL;
|
||||
}
|
||||
|
||||
$nickname = $_POST['nickname'] = strtolower($nickname);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue