Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -183,7 +183,7 @@ abstract class _LoginAbstract extends \IPS\Node\Model
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->key !== 'internal' )
|
||||
if ( mb_strtolower( $this->key ) !== 'internal' )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'login_acp', $this->acp ) );
|
||||
}
|
||||
@@ -221,6 +221,11 @@ abstract class _LoginAbstract extends \IPS\Node\Model
|
||||
|
||||
$this->testSettings();
|
||||
|
||||
if ( mb_strtolower( $this->key ) == 'internal' )
|
||||
{
|
||||
$values['login_acp'] = 1;
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
@@ -251,7 +256,7 @@ abstract class _LoginAbstract extends \IPS\Node\Model
|
||||
*
|
||||
* @param $member|NULL \IPS\Member The existing member, if one exists
|
||||
* @param $memberProperties array Any properties to set on the member (whether registering or not) such as IDs from third-party services
|
||||
* @param $name string|NULL The desired username. If not provided, or another existing user has this name, it will be left blank and the user prompted to provide it.
|
||||
* @param $name string|NULL The desired username. If not provided, not allowed, or another existing user has this name, it will be left blank and the user prompted to provide it.
|
||||
* @param $email string|NULL The user's email address. If it matches an existing account, an \IPS\Login\Exception object will be thrown so the user can be prompted to link those accounts. If not provided, it will be left blank and the user prompted to provide it.
|
||||
* @param $details mixed If $email matches an existing account, this is wgat will later be provided to link() - include any data you will need to link the accounts later
|
||||
* @param $profileSync array|NULL If creating a new account, the default profile sync settings for this provider
|
||||
@@ -284,7 +289,7 @@ abstract class _LoginAbstract extends \IPS\Node\Model
|
||||
}
|
||||
|
||||
/* Set name - if it already exists, we'll leave it blank and they'll be prompted to fill it in */
|
||||
if ( $name !== NULL )
|
||||
if ( $name !== NULL and ( !\IPS\Settings::i()->username_characters or preg_match( '/^[' . str_replace( '\-', '-', preg_quote( \IPS\Settings::i()->username_characters, '/' ) ) . ']*$/i', $name ) ) )
|
||||
{
|
||||
$existingUsername = \IPS\Member::load( $name, 'name' );
|
||||
if ( !$existingUsername->member_id )
|
||||
@@ -353,6 +358,17 @@ abstract class _LoginAbstract extends \IPS\Node\Model
|
||||
$sync = new $profileSyncClass( $member );
|
||||
$sync->sync();
|
||||
}
|
||||
|
||||
if( \IPS\Settings::i()->reg_auth_type != 'none' AND \IPS\Settings::i()->reg_auth_type != 'admin' AND !$member->members_bitoptions['bw_is_spammer'] )
|
||||
{
|
||||
\IPS\Email::buildFromTemplate( 'core', 'registration_validate', array( $member, \IPS\Db::i()->select( 'vid', 'core_validating', array( 'member_id=?', $member->member_id ) )->first() ) )->send( $member );
|
||||
}
|
||||
|
||||
/* Notify the incoming mail address except if they're a spammer */
|
||||
if( \IPS\Settings::i()->new_reg_notify && !$member->members_bitoptions['bw_is_spammer'] )
|
||||
{
|
||||
\IPS\Email::buildFromTemplate( 'core', 'registration_notify', array( $member, array() ) )->send( \IPS\Settings::i()->email_in );
|
||||
}
|
||||
}
|
||||
|
||||
/* Or just update? */
|
||||
|
||||
Reference in new issue
Block a user