The users can share the file download URL and user with credentials can download the file. All the things working fine. Once the user paste the download url in address bar, it redirects to login page and after successful login the file downloads. But its not redirecting to the loged in home page. Need to happen both things (file download & redirect to loged-in homepage) on successful login. How can we achive this.
Try to use any of these modules. I hope below modules helps you to solve your issues :
- Allow users to login using either their username OR their e-mail address.
- Allow users to login immediately.
- Provide a login form on Access Denied pages for non-logged-in (anonymous) users.
The Login Destination module allows you to customize the destination that a user is redirected to after logging in, registering to the site (7.x), using a one-time login link or logging out (7.x). The destination can be an internal page or an external URL. It is possible to specify certain conditions like referring pages or user roles and make the destination depend upon them. You may use PHP snippets to provide custom conditions and destinations. It is also possible to keep users on the currently visited page after logging in or out.
This is a very simple, lightweight module that will redirect anonymous users to the login page whenever they reach any admin-specified page paths, and will direct them back to the originally-requested page after successful login.
You can do this by using Rules module.
The Rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules).