Specific mysql data linked to user rights
Permalink 1 user found helpful
How to get data from mysql database based on the user canWrite rights?
I now have a mysql function that gets all the rows with their cID and then go through them with
foreach ($participants as $d){
$p = Page::getByID($d['cID']);
$p = new Permissions($p);
if($p->canWrite()){
print_r($d);
}
}
But with this i get an error
Fatal error: Cannot use object of type Permissions as array in /home/homsnu/public_html/c5/single_pages/dashboard/events/participants/view.php on line 67
I now have a mysql function that gets all the rows with their cID and then go through them with
foreach ($participants as $d){
$p = Page::getByID($d['cID']);
$p = new Permissions($p);
if($p->canWrite()){
print_r($d);
}
}
But with this i get an error
Fatal error: Cannot use object of type Permissions as array in /home/homsnu/public_html/c5/single_pages/dashboard/events/participants/view.php on line 67
Can't see anything wrong with the above, unless $participants is a permissions object?
O