mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
30 lines
491 B
PHP
30 lines
491 B
PHP
<?php
|
|
/**
|
|
* API Settings controller
|
|
*
|
|
* @author Pierre HUBERT
|
|
*/
|
|
|
|
class SettingsController {
|
|
|
|
/**
|
|
* Get general account settings
|
|
*
|
|
* @url POST /settings/get_general
|
|
*/
|
|
public function getGeneral(){
|
|
|
|
user_login_required(); //Login needed
|
|
|
|
//Fetch user settings
|
|
$user_settings = components()->settings->get_general(userID);
|
|
|
|
//Check for error
|
|
if(!$user_settings->isValid())
|
|
Rest_fatal_error(500, "Could not get user settings !");
|
|
|
|
print_r($user_settings);
|
|
|
|
}
|
|
|
|
} |