sonata-project / SonataUserBundle

Symfony SonataUserBundle
https://docs.sonata-project.org/projects/SonataUserBundle
MIT License
339 stars 488 forks source link

SonataUserBundle not sending emails #1018

Closed hrvojebrkasic closed 4 years ago

hrvojebrkasic commented 6 years ago

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.31.1 3.33.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.12.0 3.12.1 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.9.1  3.9.1  Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.1  2.3.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2  1.0.2  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.4.2  3.4.2  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.8.0  1.8.0  Lightweight Exporter library
sonata-project/user-bundle               4.1.1  4.1.1  Symfony SonataUserBundle

Symfony packages

$ composer show --latest 'symfony/*'
symfony/monolog-bundle     v3.1.2 v3.2.0 Symfony MonologBundle
symfony/phpunit-bridge     v3.4.4 v4.0.6 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.7.0 v1.7.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu  v1.7.0 v1.7.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.7.0 v1.7.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.7.0 v1.7.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1 v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7 v3.2.1 Symfony SwiftmailerBundle
symfony/symfony            v3.4.4 v4.0.6 The Symfony PHP framework

PHP version

$ php -v
PHP 7.2.2-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb  6 2018 16:11:23) ( NTS )

Subject

Steps to reproduce

  1. go to sonata admin page
  2. go to forgotten password
  3. enter valid username/email
  4. renders to check email page, but mail isn't sent

    Expected results

    Sent and received email with link to reset password

    Actual results

    Redirection to check email page, but mail isn't sent Issue is in AdminResettingController::sendEmailAction(), this second part of if fails because by default, ttl is set to 7200 seconds, therefore, nothing inside gets called (sending mail is here, too). If I set it in my config ttl time to null, everything works fine.

    if (null !== $user && !$user->isPasswordRequestNonExpired($ttl)) 
    {
    ...
    }
greg0ire commented 4 years ago

because by default, ttl is set to 7200 seconds

I don't understand… to reproduce the bug, do I have to wait 2 hours between 3 and 4??

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.