Posted by Anonymous on April 3, 2012 at 12:41pm
Hi, i'm trying to execute an action related to user login only if the user log in from api provided by Services module. Is there a way to do that? I checked the $account variable and token but there is no information about that.
Thanks,
Igor
Comments
Did you find a way to do
Did you find a way to do this, I'm looking for the same thing too and not having much luck
I would recommend to check
I would recommend to check path when user is logged in. arg(0) should be endpoint path.
Otherwise, you could create
Otherwise, you could create your own version of the user_service_login() method (this is for services v2 in Drupal 6) and take any appropriate action. It basically calls user_authenticate().
Always act on login
My suggestion would be to have your action always fire on login. This would cause a script to run that checks where the login originated and then conditionally does your main action.