<commit_before><?php 

/*
|--------------------------------------------------------------------------
| Ignition v0.1 ignitionpowered.co.uk
|--------------------------------------------------------------------------
|
| This class extends the functionality of Ignition. You can add your
| own custom logic here.
|
*/

require_once APPPATH.'/models/ignition/user.php';

class User extends IG_User {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    // get user by ID with following status
    function getUserByIdWithFollowingStatus($userID, $viewedByUserID)
    {
        $this->db->select('*');
        $this->db->from('users');
        $this->db->join('following', 'users.UserID = following.ChildUserID AND following.ParentUserID = ' . $viewedByUserID, 'left');
        $this->db->where('users.UserID', $userID); 
        $query = $this->db->get();

        if($query->num_rows() == 1)<commit_msg>Bug Fix: No session user id when logged out<commit_after><?php 

/*
|--------------------------------------------------------------------------
| Ignition v0.1 ignitionpowered.co.uk
|--------------------------------------------------------------------------
|
| This class extends the functionality of Ignition. You can add your
| own custom logic here.
|
*/

require_once APPPATH.'/models/ignition/user.php';

class User extends IG_User {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    // get user by ID with following status
    function getUserByIdWithFollowingStatus($userID, $viewedByUserID)
    {
        $this->db->select('*');
        $this->db->from('users');
        if($viewedByUserID != null) $this->db->join('following', 'users.UserID = following.ChildUserID AND following.ParentUserID = ' . $viewedByUserID, 'left');
        $this->db->where('users.UserID', $userID); 
        $query = $this->db->get();

        if($query->num_rows() == 1)
{'fraction_non_alphanumeric': 0.2782258064516129, 'fraction_numerical': 0.0030241935483870967, 'mean_word_length': 1.7646239554317549, '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': '231710', 'n_tokens_mistral': 547, 'n_tokens_neox': 522, 'n_words': 123}