Skip to content

Commit bf7257a

Browse files
alex88weaverryan
authored andcommitted
Using id for serializing, refreshUser with id
Serialize with only the id field, refreshed user is called by id
1 parent 9084068 commit bf7257a

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

cookbook/security/entity_provider.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ The code below shows the implementation of the
361361
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $class));
362362
}
363363

364-
return $this->loadUserByUsername($user->getUsername());
364+
return $this->findOneById($user->getId());
365365
}
366366

367367
public function supportsClass($class)
@@ -449,11 +449,6 @@ returns the list of related groups::
449449
{
450450
return serialize(array(
451451
$this->id,
452-
$this->username,
453-
$this->email,
454-
$this->salt,
455-
$this->password,
456-
$this->isActive,
457452
));
458453
}
459454

@@ -464,11 +459,6 @@ returns the list of related groups::
464459
{
465460
list (
466461
$this->id,
467-
$this->username,
468-
$this->email,
469-
$this->salt,
470-
$this->password,
471-
$this->isActive,
472462
) = unserialize($serialized);
473463
}
474464
}

0 commit comments

Comments
 (0)