Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Rather than just writing the hack.... I'll answer this as a How do I....

This same technique can be applied to a variety of scrips.

Near the top of each script, there is an authenticate function, which gets the user name, number, permissions etc.....

In sendprivate.php, look for this:

Code
<br />// -----------------<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview");  <br />   $Username =  $user['U_Username'];<br />



First we need to get this users groups, so we can add the database field to the list, like this:
Code
<br />   $user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_Groups");  <br />


Then after that bit of code, we can give it a shorter variable name if you want, like this:
Code
<br />  $UserGroups = $user['U_Groups'];<br />


Then, after that authenticate function, add a check to see if they are part of a usergroup that isn't allowed to use PMs. If they are, then we use the "not_right" function to send them a generic error message.

Code
<br />			 if (preg_match("/-5-/",$UserGroup))  { // adjust this group number if needed	<br />             $html = new html;<br />             $html -> not_right('You are not allowed to do this.',$Cat);<br />   }<br />


Hope that helps a bit.

Sponsored Links
Entire Thread
Subject Posted By Posted
Feature restriction by user group Watchdog 01/10/2003 4:19 AM
Re: Feature restriction by user group JoshPet 01/10/2003 5:38 AM
Re: Feature restriction by user group Watchdog 01/10/2003 5:57 AM
Re: Feature restriction by user group Watchdog 01/10/2003 1:32 PM
Re: Feature restriction by user group Dave_L_dup1 01/10/2003 3:40 PM
Re: Feature restriction by user group JoshPet 01/10/2003 5:30 PM
Re: Feature restriction by user group Dave_L_dup1 01/10/2003 5:34 PM
Re: Feature restriction by user group JoshPet 01/10/2003 11:45 PM
Re: Feature restriction by user group Watchdog 01/10/2003 11:51 PM
Re: Feature restriction by user group Watchdog 01/11/2003 12:06 AM
Re: Feature restriction by user group JoshPet 01/11/2003 4:44 AM
Re: Feature restriction by user group JoshPet 01/11/2003 4:52 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)