Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+5 -8
View File
@@ -54,17 +54,17 @@ class _Success
* @param \IPS\Member $member The member who has successfully logged in
* @param \IPS\Login\Handler $handler The handler that processed the login
* @param bool $rememberMe If the "remember me" box was checked
* @param bool $anonymous If the "sign in anonymously" box was checked
* @param NULL|bool $anonymous If, NULL, honour the member's anonymous setting, if TRUE or FALSE then override with that value
* @param bool $sendNewDeviceEmail Should a new device email be sent.
* @return void
*/
public function __construct( \IPS\Member $member, \IPS\Login\Handler $handler, $rememberMe = TRUE, $anonymous = FALSE, $sendNewDeviceEmail = TRUE )
public function __construct( \IPS\Member $member, \IPS\Login\Handler $handler, $rememberMe = TRUE, $anonymous = NULL, $sendNewDeviceEmail = TRUE )
{
$this->member = $member;
$this->device = \IPS\Member\Device::loadOrCreate( $member, $sendNewDeviceEmail );
$this->handler = $handler;
$this->rememberMe = $rememberMe;
$this->anonymous = ( $anonymous or $member->group['g_hide_online_list'] );
$this->anonymous = ( $anonymous === NULL ) ? ( $member->members_bitoptions['is_anon'] or $member->group['g_hide_online_list'] ) : $anonymous;
}
/**
@@ -102,17 +102,14 @@ class _Success
\IPS\Session::i()->setMember( $this->member );
if ( $this->anonymous )
{
if ( !\IPS\Settings::i()->disable_anonymous )
{
\IPS\Session::i()->setAnon();
}
\IPS\Session::i()->setAnon();
}
$this->member->last_visit = $this->member->last_activity;
$this->member->save();
/* Log device */
$this->device->anonymous = $this->anonymous and !\IPS\Settings::i()->disable_anonymous;
$this->device->anonymous = $this->anonymous;
$this->device->updateAfterAuthentication( $this->rememberMe, $this->handler );
/* Remove any noCache cookies */