2020-02-10 00:52:25 +01:00
|
|
|
<?php
|
|
|
|
|
2020-04-02 21:19:06 +02:00
|
|
|
namespace Api\User;
|
|
|
|
|
|
|
|
use \Api\Request;
|
2020-02-10 00:52:25 +01:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
?>
|