From 7a8508d56e8bb785139eb92ae3aa6b61bc210bbf Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 26 Apr 2018 18:12:30 +0200 Subject: [PATCH] Document effect of 'sessionResyncInterval' for affected operations --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index a905439..26a49c5 100644 --- a/README.md +++ b/README.md @@ -403,6 +403,8 @@ $url = 'https://www.example.com/verify_email?selector=' . \urlencode($selector) After the request to change the email address has been made, or even better, after the change has been confirmed by the user, you should send an email to their account’s *previous* email address as an out-of-band notification informing the account owner about this critical change. +**Note:** Changes to a user’s email address take effect in the local session immediately, as expected. In other sessions (e.g. on other devices), the changes may need up to five minutes to take effect, though. This increases performance and usually poses no problem. If you want to change this behavior, nevertheless, simply decrease (or perhaps increase) the value that you pass to the [`Auth` constructor](#creating-a-new-instance) as the argument named `$sessionResyncInterval`. + ### Re-sending confirmation requests If an earlier confirmation request could not be delivered to the user, or if the user missed that request, or if they just don’t want to wait any longer, you may re-send an earlier request like this: @@ -477,6 +479,8 @@ Additionally, if you store custom information in the session as well, and if you $auth->destroySession(); ``` +**Note:** Global logouts take effect in the local session immediately, as expected. In other sessions (e.g. on other devices), the changes may need up to five minutes to take effect, though. This increases performance and usually poses no problem. If you want to change this behavior, nevertheless, simply decrease (or perhaps increase) the value that you pass to the [`Auth` constructor](#creating-a-new-instance) as the argument named `$sessionResyncInterval`. + ### Accessing user information #### Login state @@ -927,6 +931,8 @@ catch (\Delight\Auth\AmbiguousUsernameException $e) { } ``` +**Note:** Changes to a user’s set of roles take effect in the local session immediately, as expected. In other sessions (e.g. on other devices), the changes may need up to five minutes to take effect, though. This increases performance and usually poses no problem. If you want to change this behavior, nevertheless, simply decrease (or perhaps increase) the value that you pass to the [`Auth` constructor](#creating-a-new-instance) as the argument named `$sessionResyncInterval`. + #### Taking roles away from users ```php @@ -959,6 +965,8 @@ catch (\Delight\Auth\AmbiguousUsernameException $e) { } ``` +**Note:** Changes to a user’s set of roles take effect in the local session immediately, as expected. In other sessions (e.g. on other devices), the changes may need up to five minutes to take effect, though. This increases performance and usually poses no problem. If you want to change this behavior, nevertheless, simply decrease (or perhaps increase) the value that you pass to the [`Auth` constructor](#creating-a-new-instance) as the argument named `$sessionResyncInterval`. + #### Checking roles ```php