[eluser]Unknown[/eluser]
Hello guys,
I would like to add a hook in my user model which manipulates the query data.
For example it should check whether the user status is active and if not, set the username to anything else.
Therefore I would like to add a function in my user model:
Code:
// models/User.php
class User extends Doctrine_Record
{
// ...
public function postQuery($event)
{
$invoker = $event->getInvoker();
if(!$invoker->active) { $invoker->username = 'any different username'; }
}
}
Is there any possibility to do this or something similar? I've spent hours on this but don't get any solution.
Thanks a lot!