Exemple #1
0
 function UnsubscribeExpired()
 {
     $unsubscribe_expired = $this->GetOption('unsubscribe_expired_members') ? $this->GetOption('unsubscribe_expired_members') : 0;
     if ($unsubscribe_expired) {
         require_once $this->pluginDir . '/core/UserSearch.php';
         $wp_user_search = new WishListMemberUserSearch($usersearch, $_GET['offset'], '', $ids, $sortby, $sortord, $howmany);
         foreach ((array) $wp_user_search->results as $uid) {
             $user = $this->Get_UserData($uid);
             $wlUser = new WishListMemberUser($user->ID);
             wlm_add_metadata($wlUser->Levels);
             foreach ($wlUser->Levels as $level) {
                 if ($level->Expired) {
                     echo $level->Level_ID;
                     $this->ARUnsubscribe($user->first_name, $user->last_name, $user->user_email, $level->Level_ID);
                 }
             }
         }
     }
 }
foreach ((array) $wp_user_search->results as $uid) {
    $user = $this->Get_UserData($uid);
    ?>
					<?php 
    /*
     * WP 2.8 Change
     * We no longer check for user_email in WordPress 2.8 because WP 2.8's sanitize_email won't save our temp email format
     * frickin WP 2.8!!!  Oh well, it's for the better anyway...
     * But since we use the same string for emails and usernames when creating temporary accounts,
     * we'll just use user_login instead
     */
    $tempuser = substr($user->user_login, 0, 5) == 'temp_' && $user->user_login == 'temp_' . md5($user->wlm_origemail);
    $xemail = $tempuser ? $user->wlm_origemail : $user->user_email;
    $wlUser = new WishListMemberUser($user->ID);
    $levels_count = count($wlUser->Levels);
    wlm_add_metadata($wlUser->Levels);
    ?>
					<tbody>
					<tr class="<?php 
    echo $alt++ % 2 ? '' : 'alternate';
    ?>
 member-row">
						<th scope="row" class="check-column"><input type="checkbox" name="wpm_member_id[]" value="<?php 
    echo $user->ID;
    ?>
" /></th>
						<td>
							<?php 
    if ($tempuser) {
        ?>
								<?php