I noticed that rules_invoke_event('login_one_time_used', $user); is called after the One Time Login link is used. It would be very useful (specially for those who don't use rules) if, in addition, a hook was thrown for this event (say hook_login_one_time_used).

Comments

danielb’s picture

I would rather just have a hook, and the rules module should just be able to attach itself through hooks. Maybe that doesn't make sense, but it's an idea worth looking into.

danielb’s picture

Status: Active » Fixed

Not really my problem but I created a Drupal core issue to see what the reaction to this idea is: #1404780: Allow modules to dynamically implement hooks.

There is also a way to invoke a hook when a rules event occurs #899422: Invoke a hook when an event occurs?
But this isn't good enough because rules must be present for the hook to fire.

So I'm just gonna go ahead and add the hook in as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.