• Resolved skdwriting

    (@skdwriting)


    [Bug] admin login:: In add patron id->Partial User name search does not work

    Description:
    When we search the user in Add Patron ID page of admin dashboard, the search finds only the FULL username. Partial user name search does not get results, even if such a user available
    Example:
    User registered already : samjohn

    If we search ‘sam’ or ‘john’, its does not return any results. We must search ‘samjohn’ to get the search to get positive result

    Can we update this?

    https://www.ads-software.com/plugins/weblibrarian/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Robert Heller

    (@robertpheller)

    The code uses WP_User_Query():

    In includes/WEBLIB_Users_Admin.php (function prepare_items()):

    global $usersearch;
        $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
        // Deal with columns
        $columns = $this->get_columns();    // All of our columns
        $hidden  = array();         // Hidden columns [none]
        $sortable = $this->get_sortable_columns(); // Sortable columns
        $this->_column_headers = array($columns,$hidden,$sortable); // Set up columns
    
        $per_page = $this->get_per_page($option);
        $paged = $this->get_pagenum();
    
        $args = array(
                    'number' => $per_page,
                    'offset' => ( $paged-1 ) * $per_page,
                    'search' => $usersearch,
                    'fields' => array('id','user_login') );
    
        $wp_user_search = new WP_User_Query( $args );

    See https://codex.www.ads-software.com/Class_Reference/WP_User_Query for more information on WP_User_Query().

    Plugin Author Robert Heller

    (@robertpheller)

    Ok, I just looked at the code WP used for listing users in the admin pages and found out the problem. I have a fix in the works — I need to do some testing, but you should expect a new version in a few days.

    Plugin Author Robert Heller

    (@robertpheller)

    I’ve just released a new version that should fix this issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Bug] admin login:: In add patron id->Partial User name search does not work’ is closed to new replies.