[TYPO3-dev] How to use hook on felogin - Disabling login for certain users

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Jun 6 17:01:49 CEST 2013


Hi,

On 6-6-2013 15:21, g4-lisz at tonarchiv.ch wrote:
> The login for certain frotend users shoud be denied. There should be a
> lookup in another DB table with a 'login_disabled' flag for each user.
> I.e. how can I hook a function in the fe login process, which gets the
> user uid and returns true or false (=allowed or not allowed)?

The best way would be make an extension that implements an 
authentication service. If it has a higher priority that the default 
service it can check the user data first and give the appropriate code 
to either:
- approve the login and stop the authentication chain (not in your 
description)
- say that the user isn't authenticated and to stop the authentication 
chain (login_disabled in your case)
- say that the user isn't authenticated and that other services should 
check further (login_enabled in your case).

In TER you can find examples of authentication services which you can 
use as model to create your own.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the TYPO3-dev mailing list