Upgrade to 3.1.0

This commit is contained in:
Bastian Allgeier
2019-03-19 11:07:14 +01:00
parent 418db4b09b
commit 6e074142f1
98 changed files with 1266 additions and 299 deletions

View File

@@ -14,8 +14,8 @@ use Kirby\Toolkit\V;
use Throwable;
/**
* The User class represents
* panel users as well as frontend users.
* The `$user` object represents a
* single Panel or frontend user.
*
* @package Kirby Cms
* @author Bastian Allgeier <bastian@getkirby.com>
@@ -134,6 +134,7 @@ class User extends ModelWithContent
/**
* Returns the url to the api endpoint
*
* @internal
* @param bool $relative
* @return string
*/
@@ -181,6 +182,7 @@ class User extends ModelWithContent
/**
* Prepares the content for the write method
*
* @internal
* @param array $data
* @param string $languageCode Not used so far
* @return array
@@ -202,6 +204,7 @@ class User extends ModelWithContent
/**
* Filename for the content file
*
* @internal
* @return string
*/
public function contentFileName(): string
@@ -237,6 +240,7 @@ class User extends ModelWithContent
/**
* Hashes user password
*
* @internal
* @param string|null $password
* @return string|null
*/
@@ -416,6 +420,7 @@ class User extends ModelWithContent
/**
* Returns the root to the media folder for the user
*
* @internal
* @return string
*/
public function mediaRoot(): string
@@ -426,6 +431,7 @@ class User extends ModelWithContent
/**
* Returns the media url for the user object
*
* @internal
* @return string
*/
public function mediaUrl(): string
@@ -471,6 +477,7 @@ class User extends ModelWithContent
/**
* Create a dummy nobody
*
* @internal
* @return self
*/
public static function nobody(): self
@@ -484,6 +491,7 @@ class User extends ModelWithContent
/**
* Returns the full path without leading slash
*
* @internal
* @return string
*/
public function panelPath(): string
@@ -495,6 +503,7 @@ class User extends ModelWithContent
* Returns the url to the editing view
* in the panel
*
* @internal
* @param bool $relative
* @return string
*/
@@ -532,6 +541,7 @@ class User extends ModelWithContent
/**
* Creates a string query, starting from the model
*
* @internal
* @param string|null $query
* @param string|null $expect
* @return mixed
@@ -776,7 +786,7 @@ class User extends ModelWithContent
throw new NotFoundException(['key' => 'user.password.undefined']);
}
if ($password === null) {
if (Str::length($password) < 8) {
throw new InvalidArgumentException(['key' => 'user.password.invalid']);
}