I am trying to give a LIST permission to all the user who are login to my site
Trying code and error I got are -
1) In the User_Level_Loaded
if(Security()->IsLoggedIn()){
$this->AddUserPermission($this->GetUserLevelName(CurrentUserLevel()), "info", ALLOW_LIST);
}
I got the error as "Fatal error: Call to a member function IsLoggedIn()".
2) Under the TablePermission_Loaded
if(Security()->IsLoggedIn()){
if(CurrentTable()->TableName == "info")$this->setCanList(TRUE);
}
I got the error as "Notice: Trying to get property of non-object"
//In this second case I am unable to get the object CurrentTable()