Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-06T04:49:06-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16190 2011-12-06T04:49:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16190&p=54639#p54639 <![CDATA[Re: if user level 1]]>
$users = $wpdb->get_results ("SELECT DISTINCT(U.user_id) as `ID`
FROM " . $wpdb->usermeta . " AS U
inner join " . $wpdb->usermeta . " as UMF on U.user_id = UMF.user_id
inner join " . $wpdb->usermeta . " as UMS on U.user_id = UMS.user_id
inner join " . $wpdb->usermeta . " as UML on U.user_id = UML.user_id
WHERE UMF.meta_key = '" . $wpdb->prefix . "s2member_custom_fields'
AND UMF.meta_value REGEXP '.*\"".display."\";s:[0-9]+:\"".Yes."\".*'
AND UML.meta_key = '" . $wpdb->prefix . "capabilities'
AND UML.meta_value REGEXP '.*\"".s2member_level1."\";s:[0-9]+:\""."1"."\".*'");

Statistics: Posted by epixmedia — December 6th, 2011, 4:49 am


]]>
2011-12-05T09:50:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16190&p=54587#p54587 <![CDATA[Re: if user level 1]]>
$users = $wpdb->get_results ("SELECT `user_id` as `ID` FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_custom_fields' AND `meta_value` REGEXP '.*\"".display."\";s:[0-9]+:\"".Yes."\".*' ORDER BY `meta_value` ASC");

Where is the member level stored?

Cheers,

Zoe

Statistics: Posted by epixmedia — December 5th, 2011, 9:50 am


]]>
2011-12-05T09:47:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16190&p=54586#p54586 <![CDATA[Re: if user level 1]]> Statistics: Posted by epixmedia — December 5th, 2011, 9:47 am


]]>
2011-12-05T08:40:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16190&p=54583#p54583 <![CDATA[Re: if user level 1]]> WP Admin -> s2Member -> API / Scripting -> Advanced/PHP Conditionals and see if that's what you mean.

Hope this helps. :)

Statistics: Posted by Eduan — December 5th, 2011, 8:40 am


]]>
2011-12-05T04:44:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16190&p=54580#p54580 <![CDATA[if user level 1]]>
Its for saying

if(userlevel= s2member level 1) {
//do this
}

in my php code...

Cheers :)

Zoe

Statistics: Posted by epixmedia — December 5th, 2011, 4:44 am


]]>