<commit_before><?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
    public function index ()
    {
        $Users = \App\User::query()->paginate(5);
        return $Users;
    }
}<commit_msg>hide password from user api<commit_after><?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
    public function index ()
    {
        // Don't select all fields to keep password hash and tokens private
        $Users = \App\User::query()->select(["id", "name_first", "name_last", "rank", "phone", "affiliation_id", "email", "created_at", "updated_at"])->paginate(5);
        return $Users;
    }
}
{'fraction_non_alphanumeric': 0.13641755634638197, 'fraction_numerical': 0.002372479240806643, 'mean_word_length': 3.7954545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4638705', 'n_tokens_mistral': 254, 'n_tokens_neox': 263, 'n_words': 63}