Permalink
Browse files

added ['smf_groups'] variable for checking what usergoups the user has

  • Loading branch information...
1 parent d093ac7 commit 5da5898bc21c861a698c87f3fd79ce07ae9ee793 Summeli committed Jan 23, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 smf2api.php
View
@@ -197,8 +197,9 @@ function smf_authenticateUser()
$ID_MEMBER = 0;
mysql_free_result($request);
}
-
-
+ // The smf_groups can be used to check which user-groups the user belongs on the SMF side
+ // it's very handy if you want to hide some information from wp-template etc.
+ $smf_user_info['smf_groups'] = array_merge(array($smf_user_info['id_group'], $smf_user_info['id_post_group']), explode(',', $smf_user_info['additional_groups']));
/* if (empty($ID_MEMBER))
$smf_user_info = array('groups' => array(-1));
else

0 comments on commit 5da5898

Please sign in to comment.