0

I have created separate dashboard for each student using login destination module. I am able to redirect the student to their profile page. There are some other pages (score card, attendence etc) which are different for each student. how do I make the details of one student not accessible for other?

6
  • Which Drupal modules (Views, Panles, or just core nodes and terms) are used to build score cards, dashboards and etc?
    – kalabro
    Nov 19, 2013 at 12:50
  • I can use content access but the issue is i have is the number of users in this is more than 2000 and applying content access manually is a difficult task. so kindly suggest me how to make it automatic so that it should activate at the time of user registration
    – Manu kumar
    Nov 19, 2013 at 14:12
  • how user private content is relatad to that user? He is content owner? Or Entity Reference? Add more info in the question please.
    – kalabro
    Nov 19, 2013 at 21:35
  • For example let me explain the facebook case. FB has the option of viewing the profile of other users but i donot want that option (the profile should not be viewable to any one other than admin) and i need that settings to be automatic when the user registers his/her account
    – Manu kumar
    Nov 21, 2013 at 9:28
  • Your comment doesn't answer my question. How private content is related to user on Drupal side?
    – kalabro
    Nov 21, 2013 at 9:55

2 Answers 2

0

You have two option to do it as per my experience. But it depends upon kind of information which you want them to see related to them.

One option is with help of VIEWS :- If you find your content somehow related to the current user then you can make a relation or use contextual filter. In most cases, I do the same. I try to relate the content to user somehow.

But you have to keep in mind. Views is tricky & very broad. You can see some complicated things in action by following some free tutorials online like - Johan Folk at nodeone.se.

Other way is at theme level:-

You fetch the current logged in user in template.php in template_preprocess_page(). Use UID to fetch the info which is required(either by query or user_load(), which ever suits you). Pass those value to some variable which can be used at page.tpl.php.

Now use them at page.tpl.php & values will be always for current user. You can even make page.tpl.php for specific user page like - page--user.tpl.php. Maybe it looks complicated but it's very easy. For me, easy than using views :)

EDITED - About not letting one accessing others profile. Just set the apropriate permission. Find in users permission section & you have option for it.

2
  • I have more than 10,000 users who are registering. If i make separate .tpl page to every one. this will go very huge. so suggest me any other way for making it automatic during user account registration.
    – Manu kumar
    Nov 21, 2013 at 9:30
  • You don't have to make separate TPL for each user. Only one TPL will do the work. Make one page tpl page--user.tpl.php & use the variable prepared at template.php. It is much easy than what you are thinking..
    – RajeevK
    Nov 21, 2013 at 10:10
1

For nodes check Content Access module. It has video tutorials.

1
  • I can use content access but the issue is i have is the number of users in this is more than 2000 and applying content access manually is a difficult task. so kindly suggest me how to make it automatic so that it should activate at the time of user registration
    – Manu kumar
    Nov 19, 2013 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.