Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -185,19 +185,19 @@ class _Device extends \IPS\Patterns\ActiveRecord
|
||||
if ( $rememberMe === NULL )
|
||||
{
|
||||
\IPS\Request::i()->setCookie( 'member_id', $this->member_id, $cookieExpiration );
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', 1, $cookieExpiration, FALSE );
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', time(), $cookieExpiration, FALSE );
|
||||
}
|
||||
elseif ( $rememberMe === TRUE )
|
||||
{
|
||||
\IPS\Request::i()->setCookie( 'member_id', $this->member_id, $cookieExpiration );
|
||||
\IPS\Request::i()->setCookie( 'login_key', $this->login_key, $cookieExpiration );
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', 1, $cookieExpiration, FALSE );
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', time(), $cookieExpiration, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Request::i()->setCookie( 'member_id', $this->member_id, NULL ); // Just tells the guest caching mechanism that we are logged in, so it can expire on the session end
|
||||
\IPS\Request::i()->setCookie( 'login_key', NULL ); // Clear it in case they previously had chosen "Remember Me"
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', 1, $cookieExpiration, FALSE );
|
||||
\IPS\Request::i()->setCookie( 'loggedIn', time(), $cookieExpiration, FALSE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,7 +269,7 @@ class _Device extends \IPS\Patterns\ActiveRecord
|
||||
$location = NULL;
|
||||
}
|
||||
|
||||
\IPS\Email::buildFromTemplate( 'core', 'new_device', array( $member, $this, $location ) )->send( $member );
|
||||
\IPS\Email::buildFromTemplate( 'core', 'new_device', array( $member, $this, $location ), \IPS\Email::TYPE_TRANSACTIONAL )->send( $member );
|
||||
}
|
||||
|
||||
$member->logHistory( 'core', 'login', array( 'type' => 'new_device', 'device' => $this->device_key, 'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : NULL ), FALSE );
|
||||
|
||||
Reference in new issue
Block a user