<commit_before><?php

class UserInfo
{
    private static $instance = null;
	private $info = array();

    //TODO: things here
    private function __construct($userAuthToken)
    {
    }

    public static function getInstance()
    {
        if (self::$instance == null)
        {
            $input = Input::getInstance();
            self::$instance = new UserInfo($input->getInput("auth_token"));
        }

        return self::$instance;
    }


    public function getInfo($info)
    {
        if (isset($this->info[$info]))
        {
            return $this->info[$info];
        }
        else
        {
            throw new Exception("key in user info did not exist", 4);
        }
    }

}<commit_msg>modify user.php to actually use authentication<commit_after><?php

class UserInfo
{
    private static $instance = null;
	private $info = array();
    private $user = null;

    //TODO: things here
    private function __construct()
    {
        $auth = AuthBackend::getInstance();
        $this->user = $auth->getCurrentUser();
        $this->info["groups"] = $auth->getCurrentUserGroups();
    }

    public static function getInstance()
    {
        if (self::$instance == null)
        {
            $input = Input::getInstance();
            self::$instance = new UserInfo();
        }

        return self::$instance;
    }


    public function getInfo($info)
    {
        if (isset($this->info[$info]))
        {
            return $this->info[$info];
        }
        else
        {
            throw new Exception("key in user info did not exist", 4);
        }
    }

}
{'fraction_non_alphanumeric': 0.13320825515947468, 'fraction_numerical': 0.0012507817385866166, 'mean_word_length': 1.8933092224231465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '1825337', 'n_tokens_mistral': 444, 'n_tokens_neox': 441, 'n_words': 110}