PHP, how to get if user owns course

Home Forums Legacy Support Support queries How-to & Troubleshooting PHP, how to get if user owns course

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #129569
    varomix
    Spectator
    Hi I'm developing a plugin that load some video for the course I only want this to load if the user owns the course how can I check this in PHP so I can use that to restrict my content, I'm sure you guys already have a way since you do it already.   Thank you
    #129585
    H.K. Latiyan
    Participant
    Hi, You mean the user is already enrolled in the course . For this we have created a function "bp_course_is_member" It takes two arguments course_id and user_id, so you can use this function like this: if(!bp_course_is_member($course_id,$user_id)) return;
    #129682
    varomix
    Spectator
    Hi yes, that worked great thank you
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘PHP, how to get if user owns course’ is closed to new replies.