Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
danielb CreditAttribution: danielb commentedYou want to stop them from moving around on the site? Don't think that is within the scope of what this module can do.
Comment #2
danielb CreditAttribution: danielb commentedComment #3
kenorb CreditAttribution: kenorb commentedThanks for the info.
If there is no any other module alternative, I'll play with it, maybe I'll find some easy solution.
Comment #4
danielb CreditAttribution: danielb commentedIt 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.
Comment #5
danielb CreditAttribution: danielb commentedThis 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.
Comment #6
kenorb CreditAttribution: kenorb commentedI've fixed it by implementing this functionality into following module:
http://drupal.org/project/deeplink
Comment #7.0
(not verified) CreditAttribution: commentedadded additional sentence.