mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 21:04:26 +02:00
multiple admin mails. It is now possible to define more than one admin mail address. You can now add multiple addresses, separated by comma.
This commit is contained in:
parent
9c2b1d39ea
commit
6684107b66
6 changed files with 88 additions and 67 deletions
|
@ -31,7 +31,7 @@ function create_user($arr) {
|
|||
|
||||
$publish = ((x($arr,'profile_publish_reg') && intval($arr['profile_publish_reg'])) ? 1 : 0);
|
||||
$netpublish = ((strlen(get_config('system','directory_submit_url'))) ? $publish : 0);
|
||||
|
||||
|
||||
$tmp_str = $openid_url;
|
||||
|
||||
if($using_invites) {
|
||||
|
@ -96,7 +96,7 @@ function create_user($arr) {
|
|||
// $pat = (($no_utf) ? '/^[a-zA-Z]* [a-zA-Z]*$/' : '/^\p{L}* \p{L}*$/u' );
|
||||
|
||||
// So now we are just looking for a space in the full name.
|
||||
|
||||
|
||||
$loose_reg = get_config('system','no_regfullname');
|
||||
if(! $loose_reg) {
|
||||
$username = mb_convert_case($username,MB_CASE_TITLE,'UTF-8');
|
||||
|
@ -110,11 +110,14 @@ function create_user($arr) {
|
|||
|
||||
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.
|
||||
|
||||
if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0) && strlen($openid_url)) {
|
||||
$adminlist = explode(",", str_replace(" ", "", strtolower($a->config['admin_email'])));
|
||||
|
||||
//if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0) && strlen($openid_url)) {
|
||||
if((x($a->config,'admin_email')) && in_array(strtolower($email), $adminlist) && strlen($openid_url)) {
|
||||
$r = q("SELECT * FROM `user` WHERE `email` = '%s' LIMIT 1",
|
||||
dbesc($email)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue