fosuserbundle

Oauth2 - how to link access_token with an actual user

给你一囗甜甜゛ 提交于 2019-12-13 03:57:06
问题 Using symfony2, fosuserbundle, fosoauthserverbundle and gtm-oauth2, once you have gotten the authorization token, how the oauth engine links (or relates) it with the user that entered his login/password credentials? I am not talking about some google or Facebook or twitter or Instagram API, but one I am supposed to be serving in a site I have created I pup with symfony2.0. I am getting perfectly the access token and I have it for whatever I have to do with it. So here comes the question. What

Overriding default FOSUserBundle template, no effect

走远了吗. 提交于 2019-12-13 02:47:35
问题 Yep, I know there are other questions like these. I checked each one, but I'm not getting what I'm doing wrong. My own template is located at: src/Grit/GritWsBundle/Resources/views/layoutBase.html.twig Which contains (hidden unnecessary markups): <!DOCTYPE html> <html> <head></head> <body> <div class="container"> {% block content %} {% endblock %} </div> </body> </html> Then, following the documentation I have created this structure to override FOSUserBundle template: src/Grit/GritWsBundle

Symfony2 FOSUserBundle Display expiresAt in twig template

自作多情 提交于 2019-12-12 22:26:17
问题 I want to display the expiresAt in my twig but i have this error : Method "expiresat" for object "AuthenticationBundle\Entity\User" does not exist in AdminNCBundle:NC:list_clients.html.twig at line 43 in my twig i have done a for : {% for client in clients %} <tr> <td>{{ client.firstname }} {{ client.lastname }}</td> <td>{{ client.telephone }}</td> <td>{{ client.registrationdate|date('Y-m-d H:i:s') }}</td> <td>{{ client.expiresat|date('Y-m-d H:i:s') }}</td> <td>{{ client.duration }}</td> </tr

Php Fatal error: momory size exhausted when using composer to install user-bundle

余生长醉 提交于 2019-12-12 21:37:16
问题 When triing to install FOSuserbundle with composer I got the following message in the Terminal: "PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 79 bytes) in phar:///Users/myname/MyWebSite/composer.phar/src/Composer/ DependencyResolver/Solver.php on line 177" How can I fix it? EDIT / FURTHER INFORMATION In Terminal typing: php -r "echo ini_get('memory_limit').PHP_EOL;" get me the following: 128M while php.ini (App/MAMP/conf/php5.4.4/php.ini) has the

FOSUser Bundle - Prevent Disabled users from logging in

て烟熏妆下的殇ゞ 提交于 2019-12-12 20:31:14
问题 I have created a loginsuccesshandler.php and am checking if the user is !enabled like this public function onAuthenticationSuccess(Request $request, TokenInterface $token) { $user = $token->getUser(); if(!$user->isEnabled()) {//do not pass go $request->getSession()->invalidate(); $this->security->setToken(null); //$token->setToken(null); return new RedirectResponse($this->router->generate('account_disabled')); } This line $request->getSession()->invalidate(); is causing the following error:

FOSuserBundle and php 5.5

﹥>﹥吖頭↗ 提交于 2019-12-12 15:32:24
问题 Ive searched the PHPuserBundle documentation and cannot find any reference to php version support issues. Ive just upgraded my php version to 5.6 (using XAMPP) and I get the following error when sending to login_check. Attempted to call function "mb_convert_case" from namespace "FOS\UserBundle\Util Is it best to stick with 5.4 for now? I tried 5.5 and got the same error. My only reason for wanting to upgrade was to stay up to date, so its not life or death but Im curious. thanks. 回答1: Try to

Lifecycle Callback Issue When Extending FOSUserBundle User Entity

老子叫甜甜 提交于 2019-12-12 15:24:28
问题 I've just imported the FOSUserBundle for the first time into a symfony2 project and I've noticed an issue when extending the user entity. I added created_at and updated_at fields with prePersist and preUpdate lifecycle callbacks but these methods are not being read. If I put setters for these fields in the constructor then the fields are populated (but obviously this does not work correctly with updated_at). The other fields I have added have worked as expected. Do you need to extend the

Change service parameter value dynamically for FOSUserBundle

偶尔善良 提交于 2019-12-12 15:21:55
问题 I asked about using multiple entity manager for FOSUserBundle before, and it turns out that FOSUserBundle has (partially) supported that. All I need to do is to specify the connection / manager I want to use in the model_manager_name parameter, as explained here fos_user: # ........ model_manager_name: account1 Sample app/config/config.yml With this FOSUserBundle will use account1 connection, and use user information in that connection's database. doctrine: dbal: default_connection: default

Impossible to generate the table “user”

余生颓废 提交于 2019-12-12 11:48:04
问题 When I install FOSUserBundle (official documentation), I try to generate my table fos_user using this command: php app/console doctrine:schema:update --force But console returns the following message Nothing to update - your database is already in sync with the current entity metadata I use Symfony 2.1 and the last version to FOSUserBundle. app/AppKernel.php contains new FOS\UserBundle\FOSUserBundle(), app/config/config.yml contains fos_user: db_driver: orm # other valid values are 'mongodb',

fosuserbundle No route found for “GET /login/”

可紊 提交于 2019-12-12 10:36:34
问题 I recently updated symfony2 using composer, and now I can't login. Here are the relevant files. Let me know if more data is needed. app/config/routing.yml app_admin: resource: "@AppAdminBundle/Resources/config/routing.yml" prefix: /admin host: dashboard.muchomonitor.com app_website: resource: "@AppWebsiteBundle/Resources/config/routing.yml" prefix: / host: www.muchomonitor.com app_monitor: resource: "@AppMonitorBundle/Resources/config/routing.yml" prefix: / host: dashboard.muchomonitor.com