Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // if you were logging in locally
- $userAccount = $accountService->findOneBy(array(
- 'username' => $userName,
- 'password' => $passwordHash
- ));
- $accountAdapter = new Account\Adapter\Local($userAccount);
- ///////////////////////////
- // or if you were logging in with google
- $userAccount = $googleService->getInformationReturnedFromGoogleAfterAuthenticating();
- $accountAdapter = new Account\Adapter\Google($userAccount);
- // either way you do the following…
- $account = new Account($accountAdapter);
- $credential = $authenticationService->createProfileFromAccount($account);
- $user = $authenticationService->findUserWithCredential($credential);
Add Comment
Please, Sign In to add comment