From d093ac710db1be94ece86916290a761508cc4baa Mon Sep 17 00:00:00 2001 From: Summeli Date: Wed, 23 Jan 2013 17:08:08 +0200 Subject: [PATCH 1/2] added ['smf_groups'] variable for checking what usergoups the user has --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 80a34fc..443a86b 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,7 @@ Feel free to edit and ask for a pull request. Plugin website: http://wordpress.org/extend/plugins/smf2wp/ Tonny + +Notes +----- +You can use global variable $smf_user_info['smf_groups'] to see which groups the users belongs on the SMF side \ No newline at end of file From 5da5898bc21c861a698c87f3fd79ce07ae9ee793 Mon Sep 17 00:00:00 2001 From: Summeli Date: Wed, 23 Jan 2013 17:09:27 +0200 Subject: [PATCH 2/2] added ['smf_groups'] variable for checking what usergoups the user has --- smf2api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smf2api.php b/smf2api.php index d4f353d..baa4185 100755 --- a/smf2api.php +++ b/smf2api.php @@ -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