This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

use session in extended Usermanager in FOSUserbundle.

Discuss Symfony 2 bundles here

use session in extended Usermanager in FOSUserbundle.

by onepiecev » Mon Nov 17, 2014 1:13 pm

I am using custom UserManager in FOSUserBundle which is configured to be used as user Manager for HWIOauthBundle.
I am redirecting user for facebook logi of HWIOauthBundle after that I get redirected to Custom userManager Service, which contains some code as ,

Code: Select all
class FOSUBUserProvider extends BaseClass {
public function loadUserByOAuthUserResponse(UserResponseInterface $response) {
       
        $session=$this->getRequest()->getSession();
        $token = $this->session->get('token');
}
}


How to get current session in this custom service,
:?~:-?~:???:

my services.yml is as follows

Code: Select all
parameters:
    my_user_provider.class: Auth\UserBundle\Security\Core\User\FOSUBUserProvider
 
services:
    my_user_provider:
        class: "%my_user_provider.class%"
        #this is the place where the properties are passed to the UserProvider - see config.yml
        arguments: [@fos_user.user_manager,{facebook: facebookID}]
onepiecev
Junior Member
 
Posts: 1
Joined: Mon Nov 17, 2014 1:04 pm