• Hello friends
    i’ve a problem in admin area exactly about user.php
    i really need to order user list by last name.

    In name list i see name + last name so
    first of all i edited the code for split:

    Line 338 adding array

    	protected function get_sortable_columns() {
    		$c = array(
    			'username' => 'login',
    			'lastname' => 'last_name',
    			'name'     => 'first_name',
    			'email'    => 'email',
    		);

    Line 469 split case name so i can see last name column

    				switch ( $column_name ) {
    					case 'username':
    						$r .= "$avatar $edit";
    						break;
    					case 'lastname':
    						$r .= "$user_object->last_name";
    						break;
    					case 'name':
    						$r .= "$user_object->first_name";
    						break;

    So the problem is that if i click on last name sorting indicator the list change always sorting by username. why?
    Can you help me please?

    • This topic was modified 8 years, 7 months ago by Bluekid.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sort user.php by last name’ is closed to new replies.