mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 04:17:09 +02:00
unset plaintext pw and hash on user save
This commit is contained in:
@@ -98,6 +98,12 @@ class User extends Data
|
||||
{
|
||||
$file = $this->file();
|
||||
if ($file) {
|
||||
// if plain text password, hash it and remove plain text
|
||||
if ($this->password) {
|
||||
$this->hashed_password = Authentication::create($this->password);
|
||||
unset($this->password);
|
||||
}
|
||||
|
||||
$username = $this->get('username');
|
||||
unset($this->username);
|
||||
$file->save($this->items);
|
||||
|
||||
Reference in New Issue
Block a user