Advertisement:

Author Topic: usergroup rights - post item in category?  (Read 1092 times)

mrdecoder

  • Full Member
  • ***
  • Posts: 124
usergroup rights - post item in category?
« on: September 15, 2012, 03:44:10 pm »
hi uhm i have one little problem
i make my site so that it has 2 parts with categories
one specific for company users and the other for individual users
the company users can also post in the individual part

now in my script the users and companies have to buy ad space in order to be possible to make an advertisement
this is also split into 2 sections

everything work perfect

exept for one part what is very anoying

when an individual user logs in i want him to only be possible to post items in the individual parts
if that person has an ad space for that section

but it seems that a user is also possible to post in a company section i want this blocked

ps. see the image


image is altered because of adult texts

 

mrdecoder

  • Full Member
  • ***
  • Posts: 124
Re: usergroup rights - post item in category?
« Reply #1 on: September 16, 2012, 03:37:34 am »
if i change the code inside themes item-post
to

Code: [Select]
$categories = Category::newInstance()->toTree(false, osc_user_is_company()); ?>
                                       


<?php if(!osc_user_is_company()) { 

$categories Category::newInstance()->toTree(trueosc_user_is_company());

ItemForm::category_select($categories);


it works
exept i think this is not correct scripting
please help me