Skip to content

Commit

Permalink
[Security] Fix wrong cache directive when using the new PUBLIC_ACCESS…
Browse files Browse the repository at this point in the history
… attribute
  • Loading branch information
wouterj committed Aug 17, 2021
1 parent 3611bfe commit aed98f8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\RememberMeBundle\Security;

use Symfony\Component\Security\Core\User\InMemoryUser;
use Symfony\Component\Security\Core\User\InMemoryUserProvider;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Security\Core\User\UserInterface;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function refreshUser(UserInterface $user)
{
$user = $this->inner->refreshUser($user);

$alterUser = \Closure::bind(function (User $user) { $user->password = 'foo'; }, null, User::class);
$alterUser = \Closure::bind(function (InMemoryUser $user) { $user->password = 'foo'; }, null, class_exists(User::class) ? User::class : InMemoryUser::class);
$alterUser($user);

return $user;
Expand Down

0 comments on commit aed98f8

Please sign in to comment.