mirror of
https://github.com/getgrav/grav.git
synced 2026-07-10 18:12:17 +02:00
Remove support for config.user, it was broken and bad practise
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* Removed an extra `/` in `CompileFile.php` [#1693](https://github.com/getgrav/grav/pull/1693)
|
||||
* Uri: Encode user and password to prevent issues in browsers
|
||||
* Fixed "Invalid AJAX response" When using Built-in PHP Webserver in Windows [#1258](https://github.com/getgrav/grav-plugin-admin/issues/1258)
|
||||
* Remove support for `config.user`, it was broken and bad practise
|
||||
|
||||
# v1.3.8
|
||||
## 10/26/2017
|
||||
|
||||
@@ -29,7 +29,6 @@ class User extends Data
|
||||
{
|
||||
$grav = Grav::instance();
|
||||
$locator = $grav['locator'];
|
||||
$config = $grav['config'];
|
||||
|
||||
// force lowercase of username
|
||||
$username = strtolower($username);
|
||||
@@ -38,7 +37,7 @@ class User extends Data
|
||||
$blueprint = $blueprints->get('user/account');
|
||||
$file_path = $locator->findResource('account://' . $username . YAML_EXT);
|
||||
$file = CompiledYamlFile::instance($file_path);
|
||||
$content = $file->content();
|
||||
$content = (array)$file->content();
|
||||
if (!isset($content['username'])) {
|
||||
$content['username'] = $username;
|
||||
}
|
||||
@@ -48,9 +47,6 @@ class User extends Data
|
||||
$user = new User($content, $blueprint);
|
||||
$user->file($file);
|
||||
|
||||
// add user to config
|
||||
$config->set("user", $user);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user