News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

is the members table "additional_groups" value included in SSI?

Started by rcane, July 12, 2022, 02:03:01 PM

Previous topic - Next topic

rcane

I'm putting a button and link in the site, and before I go and query the table I was curious if [additional_groups] is in the SSI in the same vein as [id_group] etc?

Arantor

Load SSI.php, check $user_info... it should already have been converted into $user_info['groups'] rather than being left unprocessed.

rcane

Quote from: Arantor on July 12, 2022, 02:25:47 PMLoad SSI.php, check $user_info... it should already have been converted into $user_info['groups'] rather than being left unprocessed.

Will do.  But, id_group is a different column in the table than additional_groups.   Do you mean to say they are compressed so you can just check 'all' the groups with which someone is affiliated?

Arantor

Yes.

additional_groups contains multiple groups, e.g. 12,13,14 as a string. When the current user is loaded, this is split up, merged into a proper list with id_group and id_post_group to make a single master list of group ids so you make one query to the database when loading permissions.

rcane

Quote from: Arantor on July 12, 2022, 02:35:50 PMYes.

additional_groups contains multiple groups, e.g. 12,13,14 as a string. When the current user is loaded, this is split up, merged into a proper list with id_group and id_post_group to make a single master list of group ids so you make one query to the database when loading permissions.

that's nicer than SQL wildcards.. thanks.

Advertisement: