mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-19 02:14:24 +02:00
Found lazy way to create api
This commit is contained in:
parent
4bf6f9c0ac
commit
ee73621c85
5 changed files with 50 additions and 31 deletions
|
@ -30,6 +30,13 @@ switch ($do) {
|
|||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username . ' ' . Lang::T('Login Successful'), $d['user_type'], $d['id']);
|
||||
if ($isApi) {
|
||||
if ($token) {
|
||||
showResult(true, Lang::T('Login Successful'), ['token' => "a.".$token]);
|
||||
} else {
|
||||
showResult(false, Lang::T('Invalid Username or Password'));
|
||||
}
|
||||
}
|
||||
_alert(Lang::T('Login Successful'),'success', "dashboard");
|
||||
} else {
|
||||
_log($username . ' ' . Lang::T('Failed Login'), $d['user_type']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue