mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-28 22:48:59 +00:00
21 lines
406 B
PHP
21 lines
406 B
PHP
|
<?php
|
||
|
/**
|
||
|
* User functions
|
||
|
*
|
||
|
* @author Pierre HUBERT
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* A function that check login information are specified,
|
||
|
* else it quit the scripts because of missing login
|
||
|
*
|
||
|
* @return Boolean True for a success
|
||
|
*/
|
||
|
function user_login_required(){
|
||
|
if(!defined("userID")){
|
||
|
Rest_fatal_error(401, "This function requires user to be logged in!");
|
||
|
}
|
||
|
|
||
|
//User logged in
|
||
|
return true;
|
||
|
}
|