Add user to config (#913)

This commit is contained in:
Tyler Cosgrove
2016-07-11 15:08:42 -04:00
committed by Andy Miller
parent 1fb2d7333c
commit 8e7cc01e75

View File

@@ -29,7 +29,9 @@ class User extends Data
*/
public static function load($username)
{
$locator = Grav::instance()['locator'];
$grav = Grav::instance();
$locator = $grav['locator'];
$config = $grav['config'];
// force lowercase of username
$username = strtolower($username);
@@ -48,6 +50,9 @@ class User extends Data
$user = new User($content, $blueprint);
$user->file($file);
// add user to config
$config->set("user", $user);
return $user;
}