I am working on a roster maintenance application and I’d like to limit the viewing of data in the database to the users own data. In the actionIndex in the controller.php file I see the following code:
$dataProvider=new CActiveDataProvider('FcarcMembers'); $this->render('index',array( 'dataProvider'=>$dataProvider, ));
Is there any way I can modify the data being select to include a condition such as select * from members where <the user id of this logged in user> = <the id field in members> ?
Or is there somewhere else better to apply that condition. I also need to over ride that condition when the user is an administrator.