How to invoke hook_init when user.login is called?

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by benthroop on May 14, 2010 at 10:29pm

This seems pretty simple but just wanted to ask someone knowledgeable before hacking something in... I'm using session_limit module to prevent logins from multiple locations for my site. When I use my Flex app to login, it calls user.login and a new session is created. However, session_limit is looking for hook_init to fire before it does its thing and destroys the old one. Hook_init gets called on page load... and being that I'm logging in from a Flex app, no such page load happens. So what should I do? Alter user_service.inc to make the user.login function also make a call to hook_init somehow? If so, how? Or is another method preferred?

Comments

This didn't end up mattering

Posted by benthroop on May 16, 2010 at 3:51am

This didn't end up mattering because I switched over to the Automated Logout module instead of Session Limit. However it implemented its functionality to limit users to one login, user.login() via services works with it.

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /