<commit_before><?php
class Kwc_User_Edit_Form_FrontendForm extends Kwf_Form
{
    protected $_newUserRow;

    protected function _init()
    {
        parent::_init();
        $this->setModel(Zend_Registry::get('userModel'));
    }

    public function getRow($parentRow = null)
    {
        if ($this->_rowIsParentRow($parentRow)) {
            return $parentRow;
        }
        $id = $this->_getIdByParentRow($parentRow);
        if (($id === 0 || $id === '0' || is_null($id)) && $this->_newUserRow) {
            return $this->_newUserRow;
        } else {
            return parent::getRow($parentRow);
        }
    }

    public function processInput($parentRow, $postData = array())
    {
        $id = $this->_getIdByParentRow($parentRow);
        if ($id === 0 || $id === '0' || is_null($id)) {
            $email = null;
            if ($this->getByName('email') && isset($postData[$this->getByName('email')->getFieldName()])) {
                $email = $postData[$this->getByName('email')->getFieldName()];
            }

            $this->_newUserRow = $this->_model->createUserRow(
                $email, null
            );
        }<commit_msg>use createUserRow only if Kwf_User_Model is used<commit_after><?php
class Kwc_User_Edit_Form_FrontendForm extends Kwf_Form
{
    protected $_newUserRow;

    protected function _init()
    {
        parent::_init();
        $this->setModel(Zend_Registry::get('userModel'));
    }

    public function getRow($parentRow = null)
    {
        if ($this->_rowIsParentRow($parentRow)) {
            return $parentRow;
        }
        $id = $this->_getIdByParentRow($parentRow);
        if (($id === 0 || $id === '0' || is_null($id)) && $this->_newUserRow) {
            return $this->_newUserRow;
        } else {
            return parent::getRow($parentRow);
        }
    }

    public function processInput($parentRow, $postData = array())
    {
        if ($this->_model instanceof Kwf_User_Model) {
            $id = $this->_getIdByParentRow($parentRow);
            if ($id === 0 || $id === '0' || is_null($id)) {
                $email = null;
                if ($this->getByName('email') && isset($postData[$this->getByName('email')->getFieldName()])) {
                    $email = $postData[$this->getByName('email')->getFieldName()];
                }

                $this->_newUserRow = $this->_model->createUserRow(
                    $email, null
                );
            }
        }
{'fraction_non_alphanumeric': 0.16302588996763753, 'fraction_numerical': 0.003236245954692557, 'mean_word_length': 2.1224747474747474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '4421639', 'n_tokens_mistral': 742, 'n_tokens_neox': 731, 'n_words': 126}