latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Lee Snow

Sorry, I've not written a description yet. I'll get to it soon!


My Latest Replies (From Various Topics)

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Thursday Mar 21st, 2013 at 11:45 am #45357

I solved it. The PayPal generator was never outputting this:

<input type="hidden" name="amount" value="53.25" />

Once I added that, it worked!

Posted: Friday Mar 15th, 2013 at 10:52 am #44709

Fantastic! Thank you! It works!

I’m also running some heavy plugins, which are Event Espresso, Easy Reservation, CIMY (which is about to go away, still need to port the data), BuddyPress, and W3 Total Cache, and seem to not conflict at all with the search.

Posted: Thursday Mar 14th, 2013 at 2:21 pm #44636

I actually installed s2member on a clean testing environment with my theme installed. I then placed this script in, and it still doesn’t return the user by last name. But once I disable s2member, the script works.

So before that script enacts, I have

add_action('pre_user_query', 'user_search_by_multiple_parameters');

Should I then add an input to the action like below or make a separate action?

add_action('pre_user_query', 'user_search_by_multiple_parameters', 'c_ws_plugin__s2member_users_list');

Thanks again for any help you can pass my way.

Posted: Thursday Mar 7th, 2013 at 3:57 pm #43988

Or maybe I’m not even problem solving this right. Here is the code:

function user_search_by_multiple_parameters($wp_user_query) {
        if(false === strpos($wp_user_query->query_where, '@') && !empty($_GET["s"])) {

            global $wpdb;

            $uids=array();

            $usermeta_affected_ids = $wpdb->get_results("SELECT DISTINCT user_id FROM $wpdb->usermeta WHERE (meta_key='first_name' OR meta_key='last_name'".$iusib_add.") AND LOWER(meta_value) LIKE '%".$qstr."%'");

            foreach($usermeta_affected_ids as $maf) {
                array_push($uids,$maf->user_id);
            }

            $users_affected_ids = $wpdb->get_results("SELECT DISTINCT ID FROM $wpdb->users WHERE LOWER(user_nicename) LIKE '%".$qstr."%' OR LOWER(user_email) LIKE '%".$qstr."%'");

            foreach($users_affected_ids as $maf) {
                if(!in_array($maf->ID,$uids)) {
                    array_push($uids,$maf->ID);
                }
            }
			
            $id_string = implode(",",$uids);

            $wp_user_query->query_where = str_replace("user_nicename LIKE '%".$qstr."%'", "ID IN(".$id_string.")", $wp_user_query->query_where);
        }
        return $wp_user_query;
        
Posted: Monday Mar 4th, 2013 at 1:31 pm #43714

Thanks for the input! I wasn’t talking about BuddyPress per se, just as more of a permissions/level thing.

But we have a work around for that. Another staff member asked me to look into it because it was something Drupal could do. But Drupal needs way more code than WordPress. heh.

Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.