First off, thanks very much for this solution. It will be implemented by our team in the coming weeks.

I would like support to implement the following feature for this module:
Currently, when the user wants to register on a slave website, the user is redirected to the master website (http://master.domain/user/register?external_dest=http...). When the user has registered, they are redirected back to the slave website.
Allow for an Admin API setting such that the Registration Form from the master site is loaded in an IFRAME on the slaves' "user/register" website.

To implement, I can visualize the following module changes:

  • services_sso_server_helper.module::hook_menu(). Add 2 menu callbacks to load the registration form and the password forgotten form (bypassing all page HTML/theming from the master site). Destination URL is a new menu item (see point 2).
  • services_sso_server_helper.module::hook_menu(). Add a new page with a DRUPAL behaviors javascript function call that will refresh the parent (non-IFRAME) window.
  • services_sso_client/includes/services_sso_client.admin.inc::services_sso_client_user_admin_form(). Add an option variable. The admin may choose between an IFRAME solution or the redirect method.
  • services_sso_client.module::hook_form_FORM_ID_alter(). Edit form array for "user_register" and "user_password" forms. Override the theme functions for form (if the setting in the API is enabled). Use themes "theme_services_sso_client_user_register" and "theme_services_sso_client_user_password" functions instead of "theme_user_register".and "theme_user_password" (default form definitions).
  • services_sso_client.module::hook_theme(). Add definition for theme functions (see previous point).
  • services_sso_client.module::theme_services_sso_client_user_password()
          theme_services_sso_client_user_password(&$variables){
            return '<iframe src="' . $master_site . '/user/password">[FORM HTML]</iframe>';
          }
        
  • services_sso_client.module::theme_services_sso_client_user_register(). See previous point.
  • services_sso_client.module::services_sso_client_menu_alter_callback(). If the IFRAME solution has been chosen: return immediately.

Could a maintainer give their opinion. Is there any forseeable problems with this solution?

Comments

branana’s picture

Assigned: Unassigned » branana
Status: Active » Needs work

Not foreseeing any problems. I will put this in sometimes. I would like to use colorbox for it. If you want, go ahead and submit a patch for it.

The way I've got the SSO to not apply a specific theme is I had a helper module that hard activates a Context rule which then activates a specific Delta theme configuration hiding a bunch of theme regions. The need for this obviously comes from you don't want the user to randomly click away while they are registering and not be able to find their way back to the original site.

branana’s picture

Assigned: branana » johannez
johannez’s picture

Status: Needs work » Needs review

I added a new option to the settings (admin/config/services/services-sso-client) called "Use modal overlay to load remote dialogs".
If you check that box, you will get the user registration, password and profile remote form as a colorbox overlay. If you don't check it, you will just be redirected to the remote page.

To make this work, you also need the latest dev version of the server helper.

Cheers,
Johannes

jjchinquist’s picture

Thanks for starting it off.

I have yet to do a proper patch for a true IFRAME solution - we started and worked it half way then had to suspend for a bit. We resume work on this project early next week and I will get a patch uploaded then - even if it is partial. I think that the overlay support is a different approach then what I am doing.

jjchinquist’s picture

Hello,

I tested the solution, and it has many minor issues. I honestly do not have the time to work them out, and it would be a narrowly used use case. The colorbox solution is more graceful. I propose closing this issue with won't fix.

branana’s picture

Assigned: johannez » Unassigned

Can you note the possible usability or practicality issues here so we have future reference?

jjchinquist’s picture

Usability is simply that I would load the remote website in an IFRAME such that the user is not truly aware of a remote login/registration process. Other than that, there is no difference to the colorbox solution.

The implementation does differ from the Colorbox issue. The password request and registration links on the client site need to stay "alive" and the content section must be replaced by the IFRAME. This posed some problems. The colorbox method deactivates the menu entries - therefore there is little conflict with other modules and theming on the client side.

The remaining issues for the IFRAME solution are the same as for the Colorbox. The remote Drupal 7 server machine must be themed to adequately integrate the IFRAME. Also, the javascript behaviour must be changed such that, when the registration is complete, the parent window is refreshed (and not just the IFRAME that is embedded).

Thanks for the hard work on this module!

branana’s picture

Assigned: Unassigned » johannez
Status: Needs review » Needs work
Renee S’s picture

Is it possible to backport the modal fix to 6 as well?

ckristo’s picture

I've created a Drupal 6 backport version of 7.x-1.4 with the modal fix. Needs some review though, works quite well for us. #1760858: Port 7.x-1.4 changes to 6.x-1.6

ckristo’s picture

Issue summary: View changes

correct end tag