Statistics: Posted by slyhands — November 17th, 2011, 4:39 pm
Statistics: Posted by Cristián Lávaque — November 15th, 2011, 10:32 pm
Statistics: Posted by Jason Caldwell — November 15th, 2011, 7:24 pm
$user_id = 4;
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id);
$s2_custom_fields['wall_of_heroes'] = 'no';
update_user_option($user_id, 'wp_s2member_custom_fields', $s2_custom_fields);
$user_id = 4;
$s2_custom_fields = get_user_option('s2member_custom_fields', $user_id);
$s2_custom_fields['wall_of_heroes'] = 'no';
update_user_option($user_id, 's2member_custom_fields', $s2_custom_fields);
<?
global $wpdb;
$users = $wpdb->get_results ("SELECT `user_id` as `ID` FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_custom_fields' AND `meta_value` REGEXP '.*\"wall_of_heroes\";s:[0-9]+:\"yes\".*'");
if (is_array ($users) && count ($users) > 0)
{
foreach ($users as $user)
{
// Display user info
}
}
?>
Statistics: Posted by Jason Caldwell — November 15th, 2011, 4:08 pm
<?
$users = $wpdb->get_results ("SELECT `user_id` as `ID` FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_custom_fields' AND `meta_value` REGEXP '.*\"wall_of_heroes\";s:[0-9]+:\"yes\".*'");
if (is_array ($users) && count ($users) > 0)
{
foreach ($users as $user)
{
// Display user info
}
}
$user_id = 4;
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id);
$s2_custom_fields['wall_of_heroes'] = 'no';
update_user_option($user_id, 'wp_s2member_custom_fields', $s2_custom_fields);
echo "<br>===============================================================<br>";
$user = /* Get full User object now. */ new WP_User ($user->ID);
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user->ID);
print "NAME: <strong>" . $user->display_name . "</strong> | ID: " . $user->ID . " | Wall of Heroes: " . $s2_custom_fields['wall_of_heroes'];
echo "<br>===============================================================<br>";
Statistics: Posted by slyhands — November 8th, 2011, 2:44 pm
<?php
$user_id = 4;
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id);
$s2_custom_fields['wall_of_heroes'] = 'no';
update_user_option($user_id, 'wp_s2member_custom_fields', $s2_custom_fields);
?>
Statistics: Posted by Cristián Lávaque — November 4th, 2011, 12:09 am
Statistics: Posted by slyhands — November 3rd, 2011, 12:58 pm
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id);
print_r($s2_custom_fields);
Statistics: Posted by Cristián Lávaque — November 2nd, 2011, 11:22 pm
Statistics: Posted by slyhands — November 2nd, 2011, 12:22 pm