Hi,
I'm using this module to send programatically one time login for tutor to approve some qualifications.
I'm using it as follow:

login_one_time_send_mail($student_account, $specific_path, $tutor_email);

But the problem is, when tutor is logged-in already, he can go to different paths (like account edit, etc.).
Is there any existing functionality to restrict one-time-login only for specified paths?
I see some 'Custom paths', but this options is for something else what I thought.
Any right direction would be helpful.
Thanks.

Comments

danielb’s picture

You want to stop them from moving around on the site? Don't think that is within the scope of what this module can do.

danielb’s picture

kenorb’s picture

Thanks for the info.
If there is no any other module alternative, I'll play with it, maybe I'll find some easy solution.

danielb’s picture

It may be possible to log them out after the first page they land on has finished loading. Not sure that's exactly what you're after.

danielb’s picture

Status: Active » Closed (won't fix)

This functionality doesn't really seem inline with the purpose of this module, and without knowing how it's going to be used by people there might be too many edge cases to maintain nicely. I think you could achieve this with some custom code in a module, take over this module's login_one_time_page with a hook_menu_alter(), provide your own callback which sets a variable with variable_set() to mark the request as needing to logout, then handover control of the page to the original login_one_time_page callback. Then create a hook_exit() which checks for the variable with variable_get(), logs the user out with user_logout() and then deletes the variable with variable_del().
I guess if more people ask for it maybe I'll reconsider.

kenorb’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Status: Closed (won't fix) » Fixed

I've fixed it by implementing this functionality into following module:
http://drupal.org/project/deeplink

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

added additional sentence.