diff options
author | Matt Beckett <beck24@gmail.com> | 2013-12-23 00:26:51 -0800 |
---|---|---|
committer | Matt Beckett <beck24@gmail.com> | 2013-12-23 00:26:51 -0800 |
commit | 013716a94a8a723721d876f99c6413ab580b69f5 (patch) | |
tree | f6c4b969e76fb519aa6d6dbd2b67e689162bc792 /engine/lib/sessions.php | |
parent | b0a62995706d2b7796ad30c7e0bc6471cb268de0 (diff) | |
parent | 908628e622d798c5036f7e25bc5b7d6d36d64754 (diff) | |
download | elgg-013716a94a8a723721d876f99c6413ab580b69f5.tar.gz elgg-013716a94a8a723721d876f99c6413ab580b69f5.tar.bz2 |
Merge pull request #6251 from jeabakker/3143-memcache-entity-cache-on-login
fixes #3143 login part
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r-- | engine/lib/sessions.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index fb28e1e9a..e3d5ce9cd 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -326,6 +326,12 @@ function login(ElggUser $user, $persistent = false) { set_last_login($_SESSION['guid']); reset_login_failure_count($user->guid); // Reset any previous failed login attempts + // if memcache is enabled, invalidate the user in memcache @see https://github.com/Elgg/Elgg/issues/3143 + if (is_memcache_available()) { + // this needs to happen with a shutdown function because of the timing with set_last_login() + register_shutdown_function("_elgg_invalidate_memcache_for_entity", $_SESSION['guid']); + } + return true; } |