make shell user login an admin
This commit is contained in:
parent
64353c2f67
commit
7abc568b57
|
@ -51,6 +51,7 @@ class Login extends \Panel {
|
||||||
exec("/usr/bin/echo -e '$username\\n$password\\n' | /usr/sbin/pwauth", $output, $result_code);
|
exec("/usr/bin/echo -e '$username\\n$password\\n' | /usr/sbin/pwauth", $output, $result_code);
|
||||||
if ($result_code == 0) {
|
if ($result_code == 0) {
|
||||||
$f3->set('SESSION.expiration', time() + $f3->get('TIMEOUT'));
|
$f3->set('SESSION.expiration', time() + $f3->get('TIMEOUT'));
|
||||||
|
$f3->set('SESSION.access', 'admin');
|
||||||
$f3->reroute('/');
|
$f3->reroute('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user