<commit_before><?php

class GridUsers extends Controller {

	function GridUsers()
	{
		parent::Controller();	

		$this->load->library('Table');
		$this->load->library('DX_Auth');
	}
	
	function show()
	{
		$this->load->model('dx_auth/users', 'users');

		$uri_array = $this->uri->ruri_to_assoc(3);
		if ($user_id = $uri_array['id']) {
			$user_data = get_user_data_by_grid_id($user_id);
        }
		//else do something if name submitted (TODO)
		//{
		//}

		if(isset($user_data))
		{
			$data['user_data']['User ID'] = $user_data['UserID'];
			$data['user_data']['Name'] = $user_data['Name'];

			// this stuff visible to admins only...
			if ($this->dx_auth->is_admin())
			{
				$data['user_data']['Email'] = $user_data['Email'];
				$data['user_data']['Access Level'] = $user_data['AccessLevel'];
			}
		}
		else
		{
			$data = '';
		}

		parse_template('gridusers/show', $data);
	}
}
<commit_msg>In the gridusers view, make grid user ID visible only to admins. Personally, I don't think this info needs to be protected, but I know some people are afraid of, e.g., ID<->av name databases for whatever reason.<commit_after><?php

class GridUsers extends Controller {

	function GridUsers()
	{
		parent::Controller();	

		$this->load->library('Table');
		$this->load->library('DX_Auth');
	}
	
	function show()
	{
		$this->load->model('dx_auth/users', 'users');

		$uri_array = $this->uri->ruri_to_assoc(3);
		if ($user_id = $uri_array['id']) {
			$user_data = get_user_data_by_grid_id($user_id);
        }
		//else do something if name submitted (TODO)
		//{
		//}

		if(isset($user_data))
		{
			$data['user_data']['Name'] = $user_data['Name'];

			// this stuff visible to admins only...
			if ($this->dx_auth->is_admin())
			{
				$data['user_data']['User ID'] = $user_data['UserID'];
				$data['user_data']['Email'] = $user_data['Email'];
				$data['user_data']['Access Level'] = $user_data['AccessLevel'];
			}
		}
		else
		{
			$data = '';
		}

		parse_template('gridusers/show', $data);
	}
}

{'fraction_non_alphanumeric': 0.19940029985007496, 'fraction_numerical': 0.0009995002498750624, 'mean_word_length': 3.7780429594272076, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 24, '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': '129090', 'n_tokens_mistral': 815, 'n_tokens_neox': 718, 'n_words': 138}