Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Module filter at backend


Go to End


2 Posts   955 Views

Avatar
khanhdeux

Community Member, 13 Posts

10 December 2013 at 10:03pm

Hi Silverstripe team

I have a module called Video, but at the backend i wanna display list of video which belong to the current user and modify the search function with only videos the that user uploaded? really appreciate any help? Thanks

Avatar
Willr

Forum Moderator, 5523 Posts

11 December 2013 at 8:52pm

You should post some more details about your situation. If you have a has_one relation between video and users (where Video has one 'User' you can get a users videos by using

Video::get()->filter('UserID', Member::currentUserID());

The search query would need to filter by that same 'UserID' field on your Video model.