Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
PHP Code
// Am I in group 3?
if( $userob->in_group( 3 ) ) {
// Why, yes we are
}

Is anyone out there using the in_group check successfully? I'm running 7.2.2 and it doesn't seem to work for me.

I've got a simple conditional check:

PHP Code
if ($userob->is_logged_in ) {
if (
in_array($userob->fields['USER_ID'], $authors)) {
// Allow specific IDs
$allow = 1;
} elseif (
$userob->in_group(5)) {
// Allow members in Group 5
$allow = 1;
} else {
// Not allowed
$allow = 0;
}
}


which fails, even though a user is part of group id 5. The individual ID check works fine though.

Sponsored Links
Entire Thread
Subject Posted By Posted
User Authentication Class Ian Spence 01/19/2007 10:59 PM
Re: User Authentication Class AllenAyres 01/20/2007 1:00 AM
Re: User Authentication Class Gizmo 01/20/2007 1:59 AM
Re: User Authentication Class Calpy 01/20/2007 3:03 AM
Re: User Authentication Class AllenAyres 01/20/2007 3:29 AM
Re: User Authentication Class Gizmo 01/20/2007 3:44 AM
Re: User Authentication Class Calpy 01/20/2007 3:57 AM
Re: User Authentication Class Gizmo 01/20/2007 4:05 AM
Re: User Authentication Class JoshPet 01/20/2007 7:36 AM
Re: User Authentication Class blaaskaak 03/14/2007 4:08 PM
Re: User Authentication Class blaaskaak 04/17/2007 6:15 PM
Re: User Authentication Class Ian Spence 04/19/2007 11:16 PM
Re: User Authentication Class blaaskaak 05/21/2007 11:26 PM
Re: User Authentication Class Mark_S 08/09/2007 2:13 AM
Re: User Authentication Class Mark_S 08/10/2007 1:34 PM
Re: User Authentication Class AllenAyres 08/10/2007 8:36 PM
Re: User Authentication Class Mark_S 08/10/2007 9:01 PM
Re: User Authentication Class Mark_S 08/11/2007 2:09 PM
Re: User Authentication Class AllenAyres 08/11/2007 3:32 PM
Re: User Authentication Class Ian Spence 08/12/2007 3:49 AM
Re: User Authentication Class Gizmo 08/12/2007 5:46 AM
Re: User Authentication Class AllenAyres 08/13/2007 7:20 AM
Re: User Authentication Class Mark_S 08/16/2007 10:15 PM
Re: User Authentication Class sirdude 08/16/2007 10:23 PM
Re: User Authentication Class Mark_S 08/19/2007 11:13 AM
Re: User Authentication Class Mark_S 02/19/2008 10:39 PM
Chat Profile:Need convert user_name to user_number curiousguy 04/07/2008 10:31 AM
Re: Chat Profile:Need convert user_name to user_number blaaskaak 04/07/2008 6:38 PM
Re: Chat Profile:Need convert user_name to user_number AllenAyres 04/08/2008 4:09 PM
Re: Chat Profile:Need convert user_name to user_number blaaskaak 05/12/2008 2:46 PM
Re: User Authentication Class blaaskaak 05/12/2008 7:43 PM
Re: User Authentication Class swebs 07/19/2008 1:19 AM
Re: User Authentication Class Myke 07/21/2008 3:54 PM
Re: User Authentication Class swebs 07/21/2008 8:44 PM
Re: User Authentication Class Gizmo 07/22/2008 2:07 AM
Re: User Authentication Class intensity 11/06/2008 9:00 AM
Re: User Authentication Class Gizmo 11/06/2008 3:02 PM
Re: User Authentication Class intensity 11/06/2008 6:58 PM
Re: User Authentication Class blaaskaak 11/08/2008 12:59 PM
Re: User Authentication Class blaaskaak 11/09/2008 12:04 PM
Re: User Authentication Class intensity 11/11/2008 6:10 AM
Re: User Authentication Class swebs 05/31/2010 9:23 PM
Re: User Authentication Class Myke 07/08/2008 12:53 PM
Re: User Authentication Class Gizmo 07/08/2008 4:04 PM
Re: User Authentication Class blaaskaak 07/09/2008 12:40 AM
Re: User Authentication Class sirdude 07/09/2008 1:11 AM
Re: User Authentication Class swebs 07/18/2008 12:57 AM
Re: User Authentication Class sirdude 07/18/2008 6:50 PM
Re: User Authentication Class Gizmo 04/14/2011 11:48 PM
Re: User Authentication Class Gizmo 04/15/2011 12:38 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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
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 20221218)