Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Oct 2009, 13:58
kennethj kennethj is offline
 
Join Date: Jan 2002
Real name: Kenj
[php] member of usergroup

am trying to restrict access to an external script. right now have it for members of the forum only, need to make sure they have been added, not changed to a usergroup.


we are using this php in an external script to prevent access to people who do not have access to the forum right now:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

what we need to do is check if they are also a member of a usergroup also
( are adding the usergroup and Not changing it ).

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

am not sure how to change this into the right php to achieve this.

thanks for any help .. .
__________________
Santai / GFXstyles
a certain amount of common sense is necessary to survive in this world !
insanity leaves you no restrictions !
Reply With Quote
  #2  
Old 01 Oct 2009, 16:29
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
That condition regarding usergroups is correct if it were in a template, but in a php page you would use:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(And I don't understand your other code.... if no userid, then you set the $username to the vbulletin username... but if there is no userid, then there is no username, so I don't understand what you are trying to do. And you have no parenthesis which makes it harder to read cuz I'm assuming there should be some there?)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 03 Oct 2009, 12:46
kennethj kennethj is offline
 
Join Date: Jan 2002
Real name: Kenj
Thumbs up

thanks, have it working now .. .

- the other code belongs to the rest of the script. whay? - not sure as did not wright the original one.. .
__________________
Santai / GFXstyles
a certain amount of common sense is necessary to survive in this world !
insanity leaves you no restrictions !
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:24.

Layout Options | Width: Wide Color: