Upgrade to 3.3.5

This commit is contained in:
Bastian Allgeier
2020-03-17 14:20:08 +01:00
parent 211e325864
commit 1f2f39ce58
19 changed files with 359 additions and 167 deletions

View File

@@ -277,6 +277,26 @@ trait UserActions
return F::read($this->root() . '/.htpasswd');
}
/**
* Updates the user data
*
* @param array $input
* @param string $language
* @param bool $validate
* @return self
*/
public function update(array $input = null, string $language = null, bool $validate = false)
{
$user = parent::update($input, $language, $validate);
// set auth user data only if the current user is this user
if ($user->isLoggedIn() === true) {
$this->kirby()->auth()->setUser($user);
}
return $user;
}
/**
* This always merges the existing credentials
* with the given input.