Can't recognise members of a group
-
Hi,
i have been using the following code on my site to determine if the author page that is being viewed belongs to someone who is a member of the “instructors” group.The instructors group on my site has an id of 2
This has been working fine until some time in the past week.
<?php // active instructor? $sql .= "SELECT group_id FROM wp_groups_user_group AS ugrp WHERE ugrp.user_id = %d"; $sql = $wpdb->prepare($sql, $curauth->ID); $groups = $wpdb->get_results($sql); $instructor = false; foreach ($groups as $group) { if ($group->group_id == 2) $instructor = true; } ?>
I cant seem to figure out what has changed that would make it not work. has anyone got any ideas.
An example of the page is here but this page should show information rather than the “not a current instructor” text
any help much appreciated.
Mat
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can't recognise members of a group’ is closed to new replies.