S
S
Sergey K2015-03-17 15:48:18
symfony
Sergey K, 2015-03-17 15:48:18

Symfony2 + authorization by id?

Good afternoon!
In Symfony2, I encountered such a problem - that I can not find similar questions on the Internet.
I have a user entity that has an id_vk field (id from the VKontakte profile). I need to load a user from the database whose id_vk matches the one entered.
Any ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Senkevich, 2015-03-17
@ssenkevich

## Security Configuration
security:
    providers:
        main:
            entity: { class: BlogBundle:User, property: id_vk }

J
jaxel, 2015-03-18
@jaxel

For these purposes, there is HWIOAuthBundle . It allows you to make authorization through VK and works with FosUserBundle and SonataUserBundle/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question