fosuserbundle

How to convert sha1() passwords into FOSUserBundle?

旧巷老猫 提交于 2019-12-21 21:13:13
问题 I have legacy application that keeps passwords encrypted with sha1() function, no salt. Now that site is being converted into Symfony2 and FOSUserBundle, how can I transfer them to new database? 回答1: i had the same problem just override the encoder like explained by @iamdto # app/config/security.yml security: encoders: FOS\UserBundle\Model\UserInterface: id: your.custom.encoder Your class should be use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; class CustomEncoder

FOSUserBundle , French translation is ignored

ε祈祈猫儿з 提交于 2019-12-21 20:46:13
问题 I am a new user of symfony I currently following a course( full time), My problem : # app/config/config.yml framework: translator: { fallback: %locale% } app/config/parameters.ini: I set up the French traduction(fr): ; These parameters can be imported into other config files ; by enclosing the key with % (like %database_user%) ; Comments start with ';', as in php.ini [parameters] database_driver = pdo_mysql database_host = localhost database_port = database_name = blog database_user = root

Symfony2 FosUserBundle and SonataUserBundle : overriding entities?

女生的网名这么多〃 提交于 2019-12-21 20:28:16
问题 I use FosUserBundle and SonataUserBundle for my Symfony2 project. I get confused now. I want to add fields for the entity User but it's not working. There is no update for the schema for example. Here is my config : AppKernel: ... new FOS\UserBundle\FOSUserBundle(), new Sonata\UserBundle\SonataUserBundle(), new Application\Sonata\UserBundle\ApplicationSonataUserBundle('FOSUserBundle') config.yml: ... # FOSUserBundle Configuration fos_user: db_driver: orm # BDD type firewall_name: main #

Custom Facebook FOSFacebookBundle Login Button

时间秒杀一切 提交于 2019-12-21 20:24:33
问题 some one know how custom/change image of FosFacebook login button ? {{ facebook_login_button({'autologoutlink': true}) }} And redirect on a full page facebook login not on pop-up. 回答1: This uses a twig helper and render a template with '' notation using facebook sdk js. If you need to redirect to the login-page, use an html link, call the method 'getLoginUrl' from the php facebook sdk You can access to it via the service 'fos_facebook.api' register through FOSFacebookBundle Updated with code

How to use the credentials expired property in Symfony AdvancedUserInterface?

瘦欲@ 提交于 2019-12-21 13:07:10
问题 In a Symfony 2.4 project our client wants to force the users to change their password every N days. We saw that there are columns "credentials_expired" and "credentials_expire_at" in the database and a check that throws an AccountExpiredException in the UserChecker class that seem to be for that purpose, but I can't find any documentation on how to enable or configure this feature. How can the credentials_expire_at column be filled with a date N days after now on every password change? How

Adding customised validation rules to SonataUserBundle

限于喜欢 提交于 2019-12-21 08:22:58
问题 I have installed SonataUserBundle according to the docs and it all works fine. Except that I cannot add custom validation rules. My understanding is that the new rules should be added to a new Validation Group and then config.yml is updated to tell SonataUserBundle (or FosUserBundle) to add the new rules to the validation sequence. I have tried this, in various ways, but the new rules just don't seem to be picked up at all... Here's the configuration I'm using... (For the sake of this example

FOSUserBundle : Overriding a Twig template : adding HTML elements

旧巷老猫 提交于 2019-12-21 06:27:04
问题 I'm using FOSUserBundle , and I want to add a few HTML elements to the registration form. Actually, I did and I can see the added properties to the User class in my form. The issue is that I want those fields (first name, last name, date of birth, etc..) to get the look and feel of my CSS template (bootstrap). I succeeded to do that for the login page by overriding it, since the HTML are explicitly declared. I want to do the same for the register page, however it seems confused to me, because

Edit user profile using FOS User Bundle

萝らか妹 提交于 2019-12-21 06:25:20
问题 I'm using symfony 2 with FOSUserBundle, the problem is when adding a user the current user profile logged in will be replaced by the currently added user, then when I tried to edit other user profile, the only editable would be the currently logged in user, is there something wrong with the inherited function from FOSUserBundle? I want that when adding a user, the currently logged in user would not be change with what is being added, and also when I edit another user profile, the user account

Edit user profile using FOS User Bundle

大城市里の小女人 提交于 2019-12-21 06:24:09
问题 I'm using symfony 2 with FOSUserBundle, the problem is when adding a user the current user profile logged in will be replaced by the currently added user, then when I tried to edit other user profile, the only editable would be the currently logged in user, is there something wrong with the inherited function from FOSUserBundle? I want that when adding a user, the currently logged in user would not be change with what is being added, and also when I edit another user profile, the user account

FOSUserBundle One-To-One mapped Entity not saved

早过忘川 提交于 2019-12-21 06:19:40
问题 Hi Folks i have a question regarding implementing One-To-One in Entity FosUserBundle. User Entity Has One To One Mapping With Profile Entity. I have override the basic RegistrationFormType as per shown in the FOSUserBundle's documentation. record is also saved in both table. but mapping entities show me blank data. Please find respected gist file for same. UserEntity Gist- https://gist.github.com/ajaypatelbardoli/2f0c81cbdf3b0d136785 ProfileEntity Gist - https://gist.github.com