Browse Source

- Merge with edhelas

pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
ce18e841ed
  1. 2
      app/widgets/Login/Login.php
  2. 10
      system/User.php

2
app/widgets/Login/Login.php

@ -53,6 +53,8 @@ class Login extends WidgetBase
function onConfig($packet)
{
$this->user->createDir();
RPC::call('postLogin', $this->user->getLogin(), Route::urlize('root'));
}

10
system/User.php

@ -29,7 +29,6 @@ class User {
/**
* Class constructor. Reloads the user's session or attempts to authenticate
* the user.
* Note that the constructor is private. This class is a singleton.
*/
function __construct()
{
@ -109,6 +108,15 @@ class User {
Session::dispose();
}
function createDir()
{
if(!is_dir($this->userdir)
&& $this->userdir != '') {
mkdir($this->userdir);
touch($this->userdir.'index.html');
}
}
function getLogin()
{
return $this->username;

Loading…
Cancel
Save