Download & Extend

How to redirect to popup login window when access is denied

Project:Redirect 403 to User Login
Version:6.x-1.3
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Is it possible to use this module with like ''Fancy Login'' module or ''Lightbox'' module?
So that we can let the user log in on the popup window when the access is denied and then take them to where they originally wanted to go.
I tried both ''Fancy Login'' and ''Lightbox'' but couldn't figure out how to set them up.

Comments

#1

bump

#2

would one be able to add a class to the url being pulled into the module? i'm using colorbox and it generally manages to load any link/url with the class "colorbox-load" added to it.

#3

So, I kind of cheated it. I'm sure somebody extremely adept in PHP would need a shower after reviewing this method, but my use-case is as follows:

I have several "doors" that lead to locked content. I am using colorbox to display modals. I wanted authenticated users to get a prompt to enter a code, and anonymous users to get a login window.

I built the anchor tags with the classes and URL parameters needed to open the content in a colorbox, and used the Context Assets module to load a .js file for users with appropriate credentials. In the external .js file, I wrote a function to remove the classes and parameters from the anchor tags so that the desired destination wouldn't open in a colorbox.

REAL messy, but I haven't run into any problems yet.

nobody click here