Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-05T22:30:30-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14333 2011-08-05T22:30:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29970#p29970 <![CDATA[Re: Displaying Custom Member Fields]]>

Statistics: Posted by Cristián Lávaque — August 5th, 2011, 10:30 pm


]]>
2011-08-05T07:33:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29945#p29945 <![CDATA[Re: Displaying Custom Member Fields]]>
I'll post something more inclusive when I'm all finished.

Statistics: Posted by AaronHolbrook — August 5th, 2011, 7:33 am


]]>
2011-08-05T01:06:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29930#p29930 <![CDATA[Re: Displaying Custom Member Fields]]>

Would that example get you members that have a certain post code?

Statistics: Posted by Cristián Lávaque — August 5th, 2011, 1:06 am


]]>
2011-08-04T20:23:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29890#p29890 <![CDATA[Re: Displaying Custom Member Fields]]>
Just in case anyone else was needing a good way to query the database for the custom registration fields this is what I did. The only issue is that parsing the database for unserialized data could potentially be insecure and come back to bite you in the ass if they ever change the serialization function for arrays.

Code:
add_filter('posts_where', 'a7author_search_where' );

function a7author_search_where($a7auth_param) {
   global $wpdb;

   $querystr = "
      SELECT       $wpdb->usermeta.user_id
      FROM       $wpdb->usermeta
      WHERE       $wpdb->usermeta.meta_value LIKE '%post_code%" . $a7auth_param . "%'
      
   ";

   $author2 = $wpdb->get_results($querystr);
   
   return $author2;
}

Statistics: Posted by AaronHolbrook — August 4th, 2011, 8:23 pm


]]>
2011-08-03T23:21:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29801#p29801 <![CDATA[Re: Displaying Custom Member Fields]]>
You can do something like

Code:
$user = get_user_option('s2member_custom_fields', $user_id); 


Here's a example use of that viewtopic.php?f=4&t=6546&p=16582#p16582

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — August 3rd, 2011, 11:21 pm


]]>
2011-08-03T15:17:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14333&p=29764#p29764 <![CDATA[Displaying Custom Member Fields]]>
I'd think this would be fairly straightforward - since adding custom registration fields is easy, but I can't figure out what function to use to call to get those custom registration fields to display out (like in a member directory).

Any ideas where to look?

Statistics: Posted by AaronHolbrook — August 3rd, 2011, 3:17 pm


]]>