8000 Minor updates to entity_provider.rst by dunglas · Pull Request #9256 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Minor updates to entity_provider.rst #9256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ with the following fields: ``id``, ``username``, ``password``,
/**
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive;
private $isActive = true;

public function __construct()
{
$this->isActive = true;
// may not be needed, see section on salt below
// $this->salt = md5(uniqid('', true));
}
Expand Down Expand Up @@ -314,8 +313,8 @@ and password ``admin`` (which has been encoded).

.. sidebar:: Do you need to use a Salt property?

If you use ``bcrypt``, no. Otherwise, yes. All passwords must be hashed
with a salt, but ``bcrypt`` does this internally. Since this tutorial
If you use ``bcrypt`` or ``Argon2i`` no. Otherwise, yes. All passwords must
be hashed with a salt, but ``bcrypt`` does this internally. Since this tutorial
*does* use ``bcrypt``, the ``getSalt()`` method in ``User`` can just
return ``null`` (it's not used). If you use a different algorithm, you'll
need to uncomment the ``salt`` lines in the ``User`` entity and add a
Expand Down
0