thyseus / yii-user-management

a user management module collection for the yii framework
185 stars 122 forks source link

facebook Login and registration #73

Closed abhisheksinha closed 11 years ago

abhisheksinha commented 11 years ago

i am using nodge open auth for Facebook authentication in my application. I am also using your yum -yii user module for registration and login functionality.

i am able to login using facebook but now i want to store facebook information in my database.

here is what i am doing to store facebook info like name, email and dob to database:

1)implemented nodge facebook extension and authentication works fine. 2)I am redirecting the user to registration page of yum after fb authentication. 3)Now i want to automatically update the form with the retrieved information like name, email etc in form. 4) form can be submitted by the user after that and information will be stored in our database.

please help me with the step 3- update the registration page using information fetched from facebook. how can i auto update the form with the fetched info.

PrplHaz4 commented 11 years ago

try to pre-populate the profile model before rendering the registration form

$user->profile->email = $fb->email;
$user->profile->name = $fb->name;
...etc

the activeform fields will use these values when the form is rendered

thyseus commented 11 years ago

Please take a look at the new hybridauth implementation. This populates all available profile fields automatically.

muet84 commented 11 years ago

Thyseus,

I implemented YUm with hybird auth was working fine, just noticed that if user is not already loged in with FB. and try to login from my page, on return it stop processing at hybridauth.php?hauth.done=Facebook&code.....

I will appreciate, if anyone can tell me from where to start debug this problem.

Thanks