Skip to content

Commit

Permalink
Add user to config (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivalldi authored and rhukster committed Jul 11, 2016
1 parent 1fb2d73 commit 8e7cc01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion system/src/Grav/Common/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -48,6 +50,9 @@ public static function load($username)
$user = new User($content, $blueprint);
$user->file($file);

// add user to config
$config->set("user", $user);

return $user;
}

Expand Down

0 comments on commit 8e7cc01

Please sign in to comment.