<commit_before><?php

namespace Anax\HTMLForm;

/**
 * Anax base class for wrapping sessions.
 *
 */
class CFormUser extends \Mos\HTMLForm\CForm
{
    use \Anax\DI\TInjectionaware,
        \Anax\MVC\TRedirectHelpers;


    /**
     * Constructor
     *
     */
    public function __construct($user = null)
    {
        parent::__construct([], [
            'acronym' => [
                'type'          => 'text',
                'label'         => 'Akronym',
                'value'         => (isset($user) ? (isset($user->acronym) ? $user->acronym : null) : null),
                'required'      => true,
                'validation'    => ['not_empty'],
            ],
            'email' => [
                'type'          => 'text',
                'label'         => 'Email',
                'value'         => (isset($user) ? (isset($user->email) ? $user->email : null) : null),
                'required'      => true,
                'validation'    => ['not_empty', 'email_adress'],
            ],
            'name' => [
                'type'          => 'text',
                'label'         => 'Namn',
                'value'         => (isset($user) ? (isset($user->name) ? $user->name : null) : null),
                'required'      => true,
                'validation'    => ['not_empty'],
            ],
            'password' => [
                'type'          => 'password',
                'label'         => 'Lösenord',
                'value'         => '',
                'required'      => true,
                'validation'    => ['not_empty'], 
            ],
            'passwordMatch' => [<commit_msg>update user bug<commit_after><?php

namespace Anax\HTMLForm;

/**
 * Anax base class for wrapping sessions.
 *
 */
class CFormUser extends \Mos\HTMLForm\CForm
{
    use \Anax\DI\TInjectionaware,
        \Anax\MVC\TRedirectHelpers;


    /**
     * Constructor
     *
     */
    public function __construct($user = null, $readonly = false)
    {
        parent::__construct([], [
            'acronym' => [
                'type'          => 'text',
                'label'         => 'Akronym',
                'value'         => (isset($user) ? (isset($user->acronym) ? $user->acronym : null) : null),
                'required'      => true,
                'readonly'      => $readonly,
                'validation'    => ['not_empty'],
            ],
            'email' => [
                'type'          => 'text',
                'label'         => 'Email',
                'value'         => (isset($user) ? (isset($user->email) ? $user->email : null) : null),
                'required'      => true,
                'validation'    => ['not_empty', 'email_adress'],
            ],
            'name' => [
                'type'          => 'text',
                'label'         => 'Namn',
                'value'         => (isset($user) ? (isset($user->name) ? $user->name : null) : null),
                'required'      => true,
                'validation'    => ['not_empty'],
            ],
            'password' => [
                'type'          => 'password',
                'label'         => 'Lösenord',
                'value'         => '',
                'required'      => true,
                'validation'    => ['not_empty'], 
            ],
            'passwordMatch' => [
{'fraction_non_alphanumeric': 0.16532618409294011, 'fraction_numerical': 0.0, 'mean_word_length': 1.130710659898477, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 66, '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': '6244217', 'n_tokens_mistral': 970, 'n_tokens_neox': 919, 'n_words': 164}