fosuserbundle

Success handler not working after Symfony2 login

霸气de小男生 提交于 2019-12-24 03:43:07
问题 The goal is to do something after authentication success in Symfony2. In order to do that I have extended AuthenticationSuccessHandlerInterface creating a service for the form login in order to be its success handler. Here is the firewall in the security.yml file (where the success handler is declared): firewalls: main: pattern: ^/ form_login: check_path: fos_user_security_check provider: fos_userbundle csrf_provider: form.csrf_provider success_handler: foo_user.component.authentication

Weird issue, translations works if logged in, if not then didn't work in Symfony 2.5.6

我的梦境 提交于 2019-12-24 02:49:05
问题 I come here with this weird issue around Symfony2 translations since I don't know what else to do. As title says "translations works if a user is logged in, otherwise doesn't. Here is what I've done: Set default locale and translator at config.yml : framework: translator: { fallback: "%locale%" } default_locale: "%locale%" Set locale value at parameters.yml locale: es Set language at base template: <html lang="{{ app.request.locale }}"> Check locale after page loads in Twig template where

how to set sender_name for the controller Resetting in FOSUserBundle?

余生颓废 提交于 2019-12-24 02:14:09
问题 I want to change the name of the sender_name of the email during the resetting . I already have done this while registration and it was successful. This was done easily by defining fos_user.registration.confirmation.from_email.sender_name . Now, I am wondering to do the same thing for resetting , but no email was sent. If I delete the configuration of resetting (as seen below) , the email is sent! fos_user: db_driver: orm firewall_name: main user_class: Minn\UserBundle\Entity\User

Salted sha512 in C, cannot synchronise with Symfony2's FOSUserBundle

陌路散爱 提交于 2019-12-24 01:05:46
问题 My developement is separated into two components : The website, a Symfony application using FOSUserBundle, which encrypts password using SHA512, and a salt. An authentication module, programmed in C, which should be able to reproduce the SHA512 salted hash once it's given the salt, and the cleartext password. Some information about my environment I'm using Linux Ubuntu 12.04. ldd --version answers EGLIBC 2.15-0ubuntu10.4 2.15 (maybe I need 2.7 ? But apt-get is a real PAIN when it comes to

Overriding Default FOSUserBundle Controller in Symfony 3.4

大城市里の小女人 提交于 2019-12-24 00:59:59
问题 I'm using the Fosuserbundle to manager members in my project { SF::3.4.8 }, when trying to override the controller of the registrationController by following the Symfony documentation <?php namespace TestUserBundle; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; use FOSUserBundle\Controller\RegistrationController as BaseController; class RegistrationController extends BaseController { public function registerAction(Request $request) { die(

RESTFul OAuth with FOSOAuthServer / FOSRest & FOSUser

风格不统一 提交于 2019-12-24 00:37:02
问题 I'm having difficulties to fully understand the concept of the client creation explained here. I followed the post to set up the OAuthBundle, and tried to make the changes needed to comply with FOSUser. Though I'm not sure it's perfect. My situation My Website is a RESTFul API, which return json or xml only. My frontend will be in AngularJS I combined FOSUser, FOSRest and FOSOAuth, it's possible I'm having errors in the configuration. The Problem I finished setting up the first part of the

Symfony 2 - Checking Action Permission with Roles and Groups

喜欢而已 提交于 2019-12-24 00:25:12
问题 I'm new into Symfony 2 and I read some docs about ACL and the ROLE System. I understood that I can use different Permissions on a Object with ACL. But I need some different ( ? ) type of permission check, like in the static apache turbine roles / permission sets. I want to use FOSUserBundle and using Groups. The Groups should have permissions like DOWNLOAD_PDF DOWNLOAD_PPT INVITE_USERS and so on.. Stuff that does not have something to do with Objects but I have to check in Controller ( static

symfony2 embedded forms validation for fosuserbundle

爱⌒轻易说出口 提交于 2019-12-23 21:38:08
问题 HI in my case embedded forms validation doesn't work. And i have set 'cascade_validation' => true, even tried with Valid constraint in my model to force validation on a child object. Also doesn't work. Here how it looks like: My User class: /** * @ORM\OneToOne(targetEntity="Info", inversedBy="user", cascade={"persist"}) * @Assert\Valid */ protected $info; As we see it contain an extra info field type. And now my overwritten controller: public function registerBrandAction(Request $request) { /

Symfony/FOS - pass the user id variable to a form Type

允我心安 提交于 2019-12-23 20:12:45
问题 I try to set the value of a field "author" from a CategoryType form. I want it to be the user id from the current user logged in with FOS bundle. my CategoryType form : namespace My\CategoryBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class CategoryType extends AbstractType { private $userId; public function __construct(array $userId) { $this->userId = $userId; } /** *

FOSUserBundle : no route found for Security:Login

喜欢而已 提交于 2019-12-23 19:42:35
问题 I post a problem here few days ago : FOSUserBundle: embedding the login form and choosing its template But it's pretty complicated, and I think behind this problem, there is maybe a simple problem of route, so I think it's a good idea to create a parallel topic, delete all the modifications I do, and start with fresh new installation. So, I install FOSUserBundle, I have a WelcomeBundle, which contains the several pages of my website, and I also create a fresh UserBundle, which only contains