mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-63677 core_user: Avoid redirection during signup
Purge cache just for the current user to avoid redirection when 2 simultaneous users try to sign up at the same time and some policy has to be agreed. The 'createduser' invalidation event has been removed also because is not used any more. Thanks John Azinheira for spotting it!
This commit is contained in:
parent
4c5b60a0f9
commit
c654e35007
@ -382,9 +382,6 @@ $definitions = array(
|
||||
'mode' => cache_store::MODE_SESSION,
|
||||
'simplekeys' => true,
|
||||
'simpledata' => true,
|
||||
'ttl' => 1800,
|
||||
'invalidationevents' => array(
|
||||
'createduser',
|
||||
)
|
||||
'ttl' => 1800
|
||||
),
|
||||
);
|
||||
|
@ -126,8 +126,9 @@ function user_create_user($user, $updatepassword = true, $triggerevent = true) {
|
||||
\core\event\user_created::create_from_userid($newuserid)->trigger();
|
||||
}
|
||||
|
||||
// Purge the associated caches.
|
||||
cache_helper::purge_by_event('createduser');
|
||||
// Purge the associated caches for the current user only.
|
||||
$presignupcache = \cache::make('core', 'presignup');
|
||||
$presignupcache->purge_current_user();
|
||||
|
||||
return $newuserid;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user