Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make extending "User" object easier #4

Closed
meliho opened this issue Sep 25, 2010 · 3 comments
Closed

Make extending "User" object easier #4

meliho opened this issue Sep 25, 2010 · 3 comments

Comments

@meliho
Copy link

meliho commented Sep 25, 2010

It would be nice if it were easier to extend the "User" object so that more than the Facebook ID can be saved as part of the Auth registration flow

@webtechnick
Copy link
Owner

You can, the entire login process is completely shortcutable so you can save whatever data you'd like.

Set createUser to false on your setup and then do whatever you want in beforeFilter

$var components = array('Auth', 'Facebook.Connect' => array('createUser' => false));

function beforeFilter(){
if($this->Connect->me){
//You have a logged in facebook user, do whatever you want with them.
if($this->Connect->hasAccount){
//they already have an account, log them in as normal
}
else {
//they don't have an account, save whatever you want.
}
}
}

Hope that helps,
Nick

@meliho
Copy link
Author

meliho commented Oct 29, 2010

Sorry, I never came back to say thank you. This helped a ton!

@webtechnick
Copy link
Owner

This has been resolved in cakephp2.0 branch with this commit 2e83573

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants