web-base/core/Api/Logout.class.php

25 lines
486 B
PHP
Raw Normal View History

2020-02-10 00:52:25 +01:00
<?php
namespace Api;
class Logout extends Request {
public function __construct($user, $externCall = false) {
parent::__construct($user, $externCall);
$this->loginRequired = true;
$this->apiKeyAllowed = false;
}
public function execute($values = array()) {
if(!parent::execute($values)) {
return false;
}
2020-04-02 00:02:51 +02:00
$this->success = $this->user->logout();
$this->lastError = $this->user->getSQL()->getLastError();
return $this->success;
2020-02-10 00:52:25 +01:00
}
};
?>