Vanilla2 php events: Hook Gdn::Authenticator->Trigger

Hey there!
I need to hook the function
What i want to do:
If a user has been successfully authenticated (he logged in), vanilla2 executes this function:
And if he entered a wrong password or username this function is executed:
I need my code to be executed when
should be executed...
Is that possible without modefiying
library/core/authenticators/class.passwordauthenticator.php
?
Thanks, Caerostris
I need to hook the function
Gdn::Authenticator()->Trigger(Gdn_Authenticator::AUTH_DENIED);
What i want to do:
If a user has been successfully authenticated (he logged in), vanilla2 executes this function:
Gdn::Authenticator()->Trigger(Gdn_Authenticator::AUTH_SUCCESS);
$this->FireEvent('Authenticated');
And if he entered a wrong password or username this function is executed:
Gdn::Authenticator()->Trigger(Gdn_Authenticator::AUTH_DENIED);
I need my code to be executed when
Gdn::Authenticator()->Trigger(Gdn_Authenticator::AUTH_DENIED);
is executed. My code will check the users password and username via ldap, and if its OK, Gdn::Authenticator()->Trigger(Gdn_Authenticator::AUTH_SUCCESS);
$this->FireEvent('Authenticated');
should be executed...
Is that possible without modefiying
library/core/authenticators/class.passwordauthenticator.php
?
Thanks, Caerostris
0
Comments
I could just hook the function
Authenticate($Username, $password)
from library/core/authenticators/class.passwordauthenticator.php, but its seems like its not hookable by magic methodes and so on...
Anyone has an idea how i could hook this function?