Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Different content for different usergroups in anycontent.php  (Read 2564 times)

0 Members and 1 Guest are viewing this topic.

peng12341

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Different content for different usergroups in anycontent.php
« on: August 24, 2006, 01:29:41 pm »

Hi.
How can I show users with different usergroups different content in the anycontent.php-file.
Is it possible to get the usergroups for the current user?

Thanks in advance,
peng12341
« Last Edit: August 24, 2006, 06:54:10 pm by Nibbler »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Different content for different usergroups in anycontent.php
« Reply #1 on: August 24, 2006, 02:27:57 pm »

something like this could work fro you :
Code: [Select]
if (USER_GROUP=='administrator'){
//content for administrator
}else if (USER_GROUP=='Registred'){
//content for registered group
}
USER_GROUP variable has the title of group
also you can use case statment and also you can first query xxx_categories table and find all categories title ....
Logged
‍I don't answer to PM with support question
Please post your issue to related board

peng12341

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Different content for different usergroups in anycontent.php
« Reply #2 on: August 24, 2006, 05:42:43 pm »

Thank you very much.
Thats exactly what I needed!

*thumbs up*
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 16 queries.