Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » specific user can only access to certain files, images, forum etc.

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

Page: 1
Go to End
Author Topic: 367 Views
  • ihaveqquestion
    Community Member
    12 Posts

    specific user can only access to certain files, images, forum etc. Link to this post

    Hey there,

    Im quite new to website building.

    currently, what we wish to achieve is that for each user, he or she can only access to specific content of the website with same presentation. According to username, one user can his/her image, files, forum etc. and the rest documents for other users are hidden.
    also everything needs to be done under one domain.

    can someone tell me how i need to structure it? I have done a bit research regarding MCV. I have drafted unfinished code as following, (newpage.php in mysite/code)

    class NewPage extends Page {

    class NewPage_Controller extends Page_Controller {
       static $allowed_actions = array(
       public function NewPage(){
          $data['Member'] = $this->login_model->get_member();
          $this->load->view('Page', $data);
          if ($member = Member::currentUser())
          $sqlQuery = new SQLQuery();
          $sqlQuery= "SELECT GroupID from Group_Members where MemberID='.$member->ID'"
          $rawSQL = $sqlQuery->sql();
          $result = $sqlQuery->execute();
          $groupid = $result->first();
          else {

    thanks for your help in advance.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.