<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class forum extends CI_Controller {
	function __construct()
	{
		parent::__construct();

		$this->load->helper('url');
		$this->load->library('tank_auth');
	}
	public function index()
	{
			$this->load->view('controller');
	}
}<commit_msg>Dodanie funkcji pobierającej rolę urzytkownika<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class forum extends CI_Controller {
	function __construct()
	{
		parent::__construct();

		$this->load->helper('url');
		$this->load->library('tank_auth');
	}
	public function index()
	{
		 if($this->tank_auth->is_logged_in())
		 {
		 	$userid=$this->tank_auth->get_user_id();
		 	$this->load->model('user_Model');
		 	$data['role']=$this->user_Model->getrole($userid);
		 	$this->load->view('controller',$data);
		 }
		 else
		 {
		 	 			$this->load->view('controller');
		 }
	}
}
{'fraction_non_alphanumeric': 0.18996798292422626, 'fraction_numerical': 0.0, 'mean_word_length': 4.790123456790123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '4648090', 'n_tokens_mistral': 359, 'n_tokens_neox': 321, 'n_words': 52}