<commit_before><commit_msg>fixed a bug with oauth, added dummy group backend<commit_after><?php
namespace OCA\Proton;
 
class Group extends \OC_Group_Backend {
    
    public function inGroup($uid, $gid) {
        Util::log('Check if '.$uid.' is inside '.$gid);
        return false;
    }
     
    public function getUserGroups($uid) {
        Util::log('List groups where user is: '.$uid);
        return array();
    }
    
    public function getGroups($search = '', $limit = -1, $offset = 0) {
        Util::log('Searching for groups: '.$search.' limit '.$limit.' offset '.$offset);
        try {
            $pest = Util::getPest();
        } catch (\Exception $e) { //Only triggered when there is not auth stored
            Util::log('Exception: '.$e->getMessage());
            return array();
        }
        $thing = $pest->get('/groups/?filter='.$search);
        $groups = json_decode($thing, true);
        $result = array();
        foreach ( $groups as $group) {
            $result[]  = $group['groupname'];
        }
        return $result;
        
    }
    
    
    public function groupExists($gid) {
        Util::log('Check if '.$gid.' exists');
        return true;
    }
    
    public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0){
        Util::log('Find users in group '.$gid.' pattern:' . $search.' limit '.$limit.' offset '.$offset);
        return array();
    }

}
    

?>
{'fraction_non_alphanumeric': 0.16317991631799164, 'fraction_numerical': 0.002789400278940028, 'mean_word_length': 2.106060606060606, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6148147', 'n_tokens_mistral': 426, 'n_tokens_neox': 418, 'n_words': 116}