Hello,

I have a little problem and don't know how to solve it...

I have a main site (mysite.com) with a lot of users. Now I would like to create some sub-sites with SSO integration. The main site has some services (REST Server) to send informations to sub-sites.

First case : an user logged on mysite.com go to a mysub.com. If it's the first time he visit the mysub.com, subsite call REST Server from main site to retrieve user informations stored in main site "profile" content-type.
When data are retrieved, mysub.com stores it as a new "ws_profile" content-type. Now, user has it's own profile in main and subsite, and can edit it on mysub.com without changing it on main site. Each profile has it's own life on each domain / sub-domain.

Second case : an anonymous user go to mysub.com directly, and would like to register. he go to mysub.com/user/register and fill the form. Now he validate the form. User is redirected to the main site for authentification and after, he is redirected to subsite, but not logged. User must enter informations to log-in.
But instead of redirecting user to it's own profile (mysub.com/user/me) the login phase redirect user to the homepage (mysub.com/?)

My problem is when the user make it first login, I would like to automatically redirect it on it's own profile, because there is a script called (hook_user op = "view") to send data to main site REST Server to create the profile data on main site.

I don't know how to know if it's the first time login on mysub.com for a particular user... Is there any hook to know it ? because $user->access isn't equal to 0 when user first time login, hook_user op = login isn't handled because of singlesignon_goto...

Two solutions :
1. Force login phase to redirect user to it's own profile, at least the first time he log (I have a boolean value passed from 0 to 1 after the main site profile data is created)
2. Handle first time "real" login with any suggestion you can do...

Thanks in advance for your help.

Comments

penyaskito’s picture

I have created a single issue for " hook_user op = login isn't handled because of singlesignon_goto..."

http://drupal.org/node/1266508

marinex’s picture

Hi, maybe you can use Rules module for redirect to user profile page... or another redirection module.