[TYPO3-dev] exclusive access to front end on TYPO3 4.5.x

Loek Hilgersom loek at netcoop.nl
Mon Apr 14 12:14:44 CEST 2014


Hi Ivano,

I have something that does exactly that in an existing project. The code is not 
separated in an own extension though, so I'll just paste you the necessary parts:
https://gist.github.com/netcoop/10634785

Loek


On 14-04-14 11:09, Ivano Luberti wrote:
> Thanks Dimitry, I'm aware of the fe_users, fe_sessions and
> fe_sessions_data tables and I know there is a logOff method for the
> fe_user object available in GLOBALS.
> But using logOff on a user different form the current one it is
> something that scare me a little bit.
>
> Are you suggesting to just check in the fe_sessions for another record
> with the same user id and just delete it? I was a little scared to do
> this and searching for advice to avoid some bad collateral effect
>
>
> Il 14/04/2014 08:57, Dmitry Dulepov ha scritto:
>> Hi!
>>
>> Ivano Luberti wrote:
>>> I have written an authentication service that works properly but I need
>>> to add a special behavior.
>>>
>>> More precisely I would need that if a FE user is logged in and another
>>> login is attempted for the same user from another browser, the first
>>> logged in session is logged off and the second authentication request is
>>> accepted.
>>>
>>> Did someone knows about a proper configuration or a proper programming
>>> pattern to achieve this?
>>
>> Have a look at fe_sessions table.
>>
>



More information about the TYPO3-dev mailing list