Upgrade to 3.2.5
This commit is contained in:
@@ -21,7 +21,6 @@ use Kirby\Toolkit\Str;
|
||||
*/
|
||||
trait UserActions
|
||||
{
|
||||
|
||||
/**
|
||||
* Changes the user email address
|
||||
*
|
||||
@@ -158,7 +157,7 @@ trait UserActions
|
||||
/**
|
||||
* Creates a new User from the given props and returns a new User object
|
||||
*
|
||||
* @param array $input
|
||||
* @param array $props
|
||||
* @return self
|
||||
*/
|
||||
public static function create(array $props = null)
|
||||
@@ -199,6 +198,9 @@ trait UserActions
|
||||
$languageCode = null;
|
||||
}
|
||||
|
||||
// add the user to users collection
|
||||
$user->kirby()->users()->add($user);
|
||||
|
||||
// write the user data
|
||||
return $user->save($user->content()->toArray(), $languageCode);
|
||||
});
|
||||
@@ -242,6 +244,9 @@ trait UserActions
|
||||
throw new LogicException('The user directory for "' . $user->email() . '" could not be deleted');
|
||||
}
|
||||
|
||||
// remove the user from users collection
|
||||
$user->kirby()->users()->remove($user);
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -287,6 +292,7 @@ trait UserActions
|
||||
/**
|
||||
* Writes the account information to disk
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return boolean
|
||||
*/
|
||||
protected function writeCredentials(array $credentials): bool
|
||||
|
Reference in New Issue
Block a user