Reputation: 900
I can send an email to user with the following message:
Please login into the portal to see the request
Click here to view request - http://example.com/portal/view_ar_record/c32a69ea3b86a6f89247d6e2cfae5749
The user clicks on the link. If they are already logged in, they will see that page. However, when they are not logged in, they will be redirected to the login page.
How can I get the user to the emailed URL after they have logged in?
Upvotes: 0
Views: 155
Reputation: 244
Actualy simple...
1 - Redirect to Login Page if not.. 2 - On Login Page put HTTP_REFERRER to hidden input field. 3 - use it to redirect the logged in user...
Upvotes: 0
Reputation: 8830
Before redirecting to login page, keep this URL in session with the name of return_url
in view_ar_record
. Then after successful login action, you can check session whether it has some url for redirection. If so, then redirect to redirect_url. else redirect to default page (may be home) .
Post your code in your question. So I can give code example too.
Upvotes: 2