1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 22:26:32 +02:00

Version 1.1.6 User Role, Fieldsets and Refactoring

This commit is contained in:
Sebastian
2018-05-22 23:03:27 +02:00
parent aefb9709cb
commit e346625e32
32 changed files with 1073 additions and 657 deletions

View File

@@ -13,12 +13,14 @@ class User extends WriteYaml
/* get all plugins folder */
$users = array_diff(scandir($userDir), array('..', '.'));
$cleanUser = array();
foreach($users as $key => $user)
{
if($user == '.logins'){ continue; }
$cleanUser[] = str_replace('.yaml', '', $user);
}
return $cleanUser;
}
@@ -75,8 +77,13 @@ class User extends WriteYaml
public function login($username)
{
$_SESSION['user'] = $username;
$_SESSION['login'] = true;
$user = $this->getUser($username);
if($user)
{
$_SESSION['user'] = $user['username'];
$_SESSION['role'] = $user['userrole'];
$_SESSION['login'] = true;
}
}
public function generatePassword($password)