<commit_before><?php

class rex_ycom_user extends \rex_yform_manager_dataset
{
    public static function getMe()
    {
        return rex_ycom_auth::getUser();
    }

    public function isInGroup($group_id)
    {
        $ycom_groups = $this->getValue('ycom_groups');

        if ('' == $group_id) {
            return true;
        }
        if ('' != $ycom_groups) {
            $ycom_groups_array = explode(',', $ycom_groups);
            if (in_array($group_id, $ycom_groups_array)) {
                return true;
            }
        }

        return false;
    }

    public function getPassword()
    {
        return $this->password;
    }

    public static function createUserByEmail(array $data)
    {
        $data['status'] = 1;
        $data['password'] = <PASSWORD>_shuffle('<PASSWORD>');
        $data['login'] = $data['email'];
        $data['login_tries'] = 0;
        $data['termofuse_accepted'] = 0;

        $data = rex_extension::registerPoint(new rex_extension_point('YCOM_USER_CREATE', $data, []));

        $user = self::create();
        foreach ($data as $k => $v) {
            $user->setValue($k, $v);
        }
        if ($user->save()) {
            return $user;<commit_msg>termofuse -> termsofuse angepasst, webb createUserByEmail genutzt wird<commit_after><?php

class rex_ycom_user extends \rex_yform_manager_dataset
{
    public static function getMe()
    {
        return rex_ycom_auth::getUser();
    }

    public function isInGroup($group_id)
    {
        $ycom_groups = $this->getValue('ycom_groups');

        if ('' == $group_id) {
            return true;
        }
        if ('' != $ycom_groups) {
            $ycom_groups_array = explode(',', $ycom_groups);
            if (in_array($group_id, $ycom_groups_array)) {
                return true;
            }
        }

        return false;
    }

    public function getPassword()
    {
        return $this->password;
    }

    public static function createUserByEmail(array $data)
    {
        $data['status'] = 1;
        $data['password'] = str_shuffle('<PASSWORD>');
        $data['login'] = $data['email'];
        $data['login_tries'] = 0;
        $data['termsofuse_accepted'] = 0;

        $data = rex_extension::registerPoint(new rex_extension_point('YCOM_USER_CREATE', $data, []));

        $user = self::create();
        foreach ($data as $k => $v) {
            $user->setValue($k, $v);
        }
        if ($user->save()) {
            return $user;
{'fraction_non_alphanumeric': 0.1475940153659523, 'fraction_numerical': 0.002426202992317024, 'mean_word_length': 2.1435832274459976, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 17, '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': '4693458', 'n_tokens_mistral': 802, 'n_tokens_neox': 781, 'n_words': 143}