I am trying to use Colorbox for a custom login link - I do not have 'Enable for login links' checked. The behavior I'd like is to have the user login via Colorbox, & upon successful login be redirected to their user page. My example link is

<a href="/user/login?width=420&height=236&iframe=false" class="colorbox-load">Login</a>

I thought that 'iframe=false' would not make the following page load in the iframe but the User page is loading in the iframe. It does not seem to make a difference if iframe = false or true.

How can I get this to work, or can Colorbox not do this?

Comments

frjo’s picture

Status: Active » Closed (duplicate)

See https://drupal.org/node/883210

There is a patch there that improves the login function a lot. Please try it out and report in that issue.

If you absolutely don't want to use the "Enable for login links" function for some reason the manuall link should look something like this.

<a class="colorbox-load" href="/colorbox/form/user_login?destination=user&width=420&height=236&iframe=false">Log In</a>

The "destination=user" decided where the users goes after submitting the form. You can add a path to any part of your site here.

Bricks and Clicks Marketing’s picture

Since I want register links with the exact same behavior, I don't want to use the 'Enable for login links' function. This is not working for me at all - the iframe persists, so after registering or logging in, the /user page is loaded within the colorbox. Is this the correct behavior?

Bricks and Clicks Marketing’s picture

I've fixed this using colorbox-inline, and it's working great - in every browser except IE7/8/9.