Get post access level

This commit is contained in:
Pierre
2018-01-04 13:59:48 +01:00
parent 96b4f6b99e
commit 7f6ac13d7d
3 changed files with 159 additions and 4 deletions

View File

@ -17,6 +17,14 @@ class User{
*/
private $userLoginAPItable = "";
/**
* Pages visiblity levels
*/
const USER_PAGE_PRIVATE = 0;
const USER_PAGE_PUBLIC = 1;
const USER_PAGE_OPEN = 2;
/**
* Public constructor
*/
@ -382,13 +390,13 @@ class User{
//Check if the page is public
if($result[0]["public"] == 0)
return 0;
return $this::USER_PAGE_PRIVATE;
//Check if the page is open or not
if($result[0]["pageouverte"] == 1)
return 3; //Page open
return $this::USER_PAGE_OPEN; //Page open
else
return 2; //Public page
return $this::USER_PAGE_PUBLIC; //Public page
}