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

25 lines
424 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;
}
$this->success = true;
$this->user->logout();
return true;
}
};
?>