This topic is locked

dynamic permission - group ID

2/7/2012 5:35:01 AM
PHPRunner General questions
C
chanpeter88 author

I use dynamic permission option in phprunner V6. I want to know the groupID (from project1_ugmembers table) through the events. I want to add conditional codes to the event depended on what groupID. Pls advise.

C
cgphp 2/7/2012
$rs = CustomQuery("SELECT GroupID FROM project1_ugmembers WHERE username='".$_SESSION["UserID"]."'");

$data = db_fetch_array($rs);
if($data['GroupID'] == 1)

{

//blah1 blah1 blah1

}

else

{

//blah2 blah2 blah2

}
C
chanpeter88 author 2/9/2012

How can I add own custom user permission ? I want to add upload and download file permission. How can I do ?

Sergey Kornilov admin 2/9/2012

Probably the best approach is to create two custom views (with upload enabled and disabled) and restrict access to those views via User Group permissions.