[TYPO3-dev] Tapping into 'auth' Service Type
Frank Weindel
fjw24 at drexel.edu
Thu Oct 2 18:40:58 CEST 2008
Dmitry Dulepov wrote:
> Hi!
>
> Frank Weindel wrote:
>> I am trying to create an extension that will modify a FE user's log-in
>> information right after they first log-in with a username and
>> password, but before the username and password is sent to be
>> authenticated. It should just md5 hash the password and put it back to
>> be authenticated.
>>
>> I'm looking into services for this. There is a service called 'auth'
>> with a subType 'getUserFE', and I thought if I could tap into this I
>> could succeed in what I want to do. So I used the extension wizard to
>> add a service to my extension. But I noticed that the 'auth',
>> 'getUserFE' service is called by 'class.t3lib_userauth.php' before my
>> service is even added.
>>
>> So basically what I am asking: Is there a way to add my service before
>> authentication is run?
>
> I would look for a hook. If you want just to change password to its md5
> value, you do not need a service. Look for a hook that is called before
> user authentication.
>
Thanks Dmitry!
Originally I couldn't find any hooks that are executed before the user
is authenticated. After tracing the execution of the FE scripts I
managed to find one ['tslib/class.tslib_fe.php']['connectToDB']. My
purpose has nothing to do with databases, but it serves fine just
because all I need to do is modify the $_POST var. Its a bit hacky but
it works :-)
Frank Weindel
More information about the TYPO3-dev
mailing list