Community Support Forums — WordPress® ( Users Helping Users ) — 2011-02-26T01:35:14-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2491 2011-02-26T01:35:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2491&p=7160#p7160 <![CDATA[Re: Adding custom member profile fields to signup moderation]]>
Code:

<div class="wrap">
      <h2><?php _e('Registration Requests Pending Approval','wp-user-moderation'); ?></h2>

      <?php if(!$users = $this->getPendingUsers()) : ?>
         <div class="error">
            <ul>
               <li><?php _e('No Pending Requests at this time for Approval...','wp-user-moderation'); ?></li>
            </ul>
         </div>
      <?php else : ?>
         <table class="widefat">
             <tbody>
               <tr class="thead">
                  <th><?php _e('ID','wp-user-moderation') ?></th>
                  <th><?php _e('Username','wp-user-moderation') ?></th>
   <th>City</th>
                  <th><?php _e('First Name','wp-user-moderation') ?></th>
                  <th><?php _e('Last Name','wp-user-moderation') ?></th>
                  <th><?php _e('E-mail','wp-user-moderation') ?></th>
                  <th colspan="2" style="text-align: center"><?php _e('Actions','wp-user-moderation') ?></th>
               </tr>
             </tbody>
             <tbody>
             <?php foreach($users as $user_object) : ?>
                <tr class="alternate">
                   <td><?php echo $user_object->ID; ?></td>
                  <td><?php echo $user_object->user_login; ?></td>
        <td><?php echo get_user_field("city"); ?></td>
                  <td><?php echo get_usermeta($user_object->ID,'first_name'); ?></td>
                  <td><?php echo get_usermeta($user_object->ID,'last_name'); ?></td>
                  <td><?php echo $user_object->user_email; ?></td>

                  <td><a href="<?php echo $_SERVER['PHP_SELF'];?>?page=WPUserMod&amp;userid=<?php echo $user_object->ID; ?>&amp;do=discard" class="edit"><?php _e('Discard','wp-user-moderation') ?></a></td>
                  <td><a href="<?php echo $_SERVER['PHP_SELF'];?>?page=WPUserMod&amp;userid=<?php echo $user_object->ID; ?>&amp;do=approve" class="edit"><?php _e('Approve','wp-user-moderation') ?></a></td>
               </tr>
            <?php endforeach; ?>
             </tbody>
         </table>
      <?php endif; ?>
   </div>





What i added:

Code:
<th>City</th>

<td><?php echo get_user_field("city"); ?></td>





It doesn't pull any data from the database. I am really green, so I know its probably elementary, but I must be missing some statement to get it from a different table than what this plugin is pulling data from? Sorry if I sound really unclear.

Thanks!

Statistics: Posted by mctwisty — February 26th, 2011, 1:35 am


]]>
2011-02-23T22:08:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2491&p=7084#p7084 <![CDATA[Re: Adding custom member profile fields to signup moderation]]>
WP Admin -> s2Member -> General Options -> Custom Registration Fields

Statistics: Posted by Cristián Lávaque — February 23rd, 2011, 10:08 pm


]]>
2011-02-23T15:34:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2491&p=7075#p7075 <![CDATA[Adding custom member profile fields to signup moderation]]>
Would like to know what I add to the code to add some custom signup fields into signiup moderation plugin v. 0.1.

Example: user's that signup have city, state and zip. How would i include that in this table with the php code below?

<table class="widefat">
<tbody>
<tr class="thead">
<th><?php _e('ID','wp-user-moderation') ?></th>
<th><?php _e('Username','wp-user-moderation') ?></th>
<th><?php _e('First Name','wp-user-moderation') ?></th>
<th><?php _e('Last Name','wp-user-moderation') ?></th>
<th><?php _e('E-mail','wp-user-moderation') ?></th>
<th colspan="2" style="text-align: center"><?php _e('Actions','wp-user-moderation') ?></th>
</tr>
</tbody>
<tbody>
<?php foreach($users as $user_object) : ?>
<tr class="alternate">
<td><?php echo $user_object->ID; ?></td>
<td><?php echo $user_object->user_login; ?></td>
<td><?php echo get_usermeta($user_object->ID,'first_name'); ?></td>
<td><?php echo get_usermeta($user_object->ID,'last_name'); ?></td>
<td><?php echo $user_object->user_email; ?></td>
<td><a href="<?php echo $_SERVER['PHP_SELF'];?>?page=WPUserMod&amp;userid=<?php echo $user_object->ID; ?>&amp;do=discard" class="edit"><?php _e('Discard','wp-user-moderation') ?></a></td>
<td><a href="<?php echo $_SERVER['PHP_SELF'];?>?page=WPUserMod&amp;userid=<?php echo $user_object->ID; ?>&amp;do=approve" class="edit"><?php _e('Approve','wp-user-moderation') ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

Statistics: Posted by mctwisty — February 23rd, 2011, 3:34 pm


]]>