set a uid for the user at login for ftp filtering

This commit is contained in:
Ludovic Poujol 2021-04-28 16:21:29 +02:00
parent 372b00101d
commit ae30498030

View file

@ -20,6 +20,7 @@ if ((empty($_GET['form']) || $_GET['form']!=1) && !empty($_POST)) {
if (hash("sha256",$password) == $conf['logins'][$username]) {
$_SESSION['auth']=1;
$_SESSION['user']=$username;
$_SESSION['user_id'] = posix_getpwnam($username) ? posix_getpwnam($username)['uid'] : 65534;
$_SESSION['error']='';
} else {
$_SESSION['auth']=0;