get_lockouts(); //Gets all lockouts, host and user //Send the user name or false foreach ( $lockouts as $key => $lockout ) { $userdata = get_userdata( intval( $lockout['lockout_user'] ) ); if ( $userdata === false ) { $lockout['lockout_user'] = false; } else { $lockout['lockout_username'] = $userdata->user_login; } $lockouts[$key] = $lockout; } return array( 'api' => '0', 'lockouts' => $lockouts, ); } }