-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add last login refresh request event listener #55
Conversation
e5d881d
to
1f6870d
Compare
1f6870d
to
2a4bb8a
Compare
@@ -79,6 +83,12 @@ public function getConfigTreeBuilder() | |||
|
|||
$rootNode | |||
->children() | |||
->arrayNode(self::LAST_LOGIN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would use canBeEnabled
and set a default value to refresh_interval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
EventListener/LastLoginListener.php
Outdated
use Symfony\Component\HttpKernel\Event\FilterControllerEvent; | ||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; | ||
|
||
class LastLoginListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpdoc
EventListener/LastLoginListener.php
Outdated
* | ||
* @param FilterControllerEvent $event | ||
*/ | ||
public function onCoreController(FilterControllerEvent $event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not on kernel.terminate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wachterjohannes if I remember it correctly we did that if a query based on active users dont return 0 users when 1 user is online and the last login will be refreshed.
EventListener/LastLoginListener.php
Outdated
*/ | ||
public function isActiveNow(BaseUser $user) | ||
{ | ||
$delay = new \DateTime($this->interval . ' minutes ago'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you configure this string? 10 minutes
or 10 seconds
you could then configure it more accuate for your application. 10 minutes
seems a good default - but some faster applications maybe want to configure that in seconds or in hours for very slow apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wachterjohannes only want an integer value in the configuration but can set it to seconds so it like the cacheLifetime. ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok (:
UPGRADE.md
Outdated
### Parameter `sulu_community.config` was removed | ||
|
||
The whole config as parameter is not longer available the webspaces config | ||
you can get over the `sulu_community.webspaces` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling it sulu_community.webspace_config
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wachterjohannes it is not a single webspace it contains all webspaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sulu_community.webspaces_config
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@wachterjohannes ready |
@alexander-schranz will wait for tests and then merging it. |
* Fixed dynamic list factory with hidden fields
# Changelog - FEATURE sulu#59 Added correct composer dependencies - FEATURE sulu#57 Added basic theme for dynamic forms - FEATURE sulu#56 Added daterange to csv export overlay for sulu 1.5 - BUGFIX sulu#55 Fixed dynamic list factory with hidden fields - BUGFIX sulu#54 Fixed date type default value - ENHANCEMENT sulu#52 Update sulu from `alexander-schranz/sulu-form-bundle` from commit `c110e72e44a58a0f53428c153e405124695506f6` - BUGFIX sulu#52 Fixed form preview request analyzer - BUGFIX sulu#52 Fixed second date field type - BUGFIX sulu#52 Fixed missing translation and documentation - ENHANCEMENT sulu#52 Added missing documentation - BUGFIX sulu#52 Fixed success email not sent to email in data json - BUGFIX sulu#52 Fixed missing uniqueness in form fields table - BUGFIX sulu#52 Fixed permission denied on fields action - FEATURE sulu#52 Added toggler to set email as replyTo - BUGFIX sulu#52 Fixed exception controller redirect - BUGFIX sulu#52 Fixed form select by using native select - FEATURE sulu#52 Added media collection strategy tree - FEATURE sulu#52 Added support to add dynamic list to article bundle - BUGFIX sulu#52 Fixed csv export for bool values - ENHANCEMENT sulu#52 Fixed sort on dynamic list and removed search - FEATURE sulu#52 Added dynamic form list and export - FEATURE sulu#20 Added additional receivers for sending notification as CC or BCC - ENHANCEMENT sulu#23 Fixed composer json links and description - BUGFIX sulu#16 Fixed setting of entity value in dynamic which represents an array - ENHANCEMENT sulu#13 Added dynamic type pool service for enabling custom form field types - ENHANCEMENT sulu#10 Update sulu from `alexander-schranz/sulu-form-bundle` from commit `c16a04b15fe320c039064de05ddaef9d087dbc6f` - BUGFIX sulu#10 Fixed permission problem on false locale - BUGFIX sulu#10 Fixed limitation of content type select - FEATURE sulu#10 Added options for attachment validation - BUGFIX sulu#10 Fixed multiple choices to text type columns - BUGFIX sulu#10 Fixed naming of mailchimp parameters - FEATURE sulu#3 Added short title to fields - FEATURE sulu#2 Changed title field for labels to texteditor - ENHANCEMENT #- Updated namespaces and rename table names - ENHANCEMENT #- Forked from `alexander-schranz/sulu-form-bundle` from commit `36a7cd11562ed0c9f64752b37707cc2771e0baca`
What's in this PR?
Add posibility to refresh last login every 10 minutes.