<commit_before><?
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */
?>

<fieldset>
    <legend><?= translate('System Information') ?></legend>
    <div>
        <label for="enabled"><?= translate('Enable User') ?></label>
        <div>
            <input <?= object('user')->getId() == $user->id ? 'disabled="disabled"' : ''?> type="checkbox" id="enabled" name="enabled" value="1" <?= $user->enabled ? 'checked="checked"' : '' ?> />
        </div>
    </div>
    <div>
        <label for="send_email"><?= translate('Receive System E-mails') ?></label>
        <div>
            <input type="checkbox" id="send_email" name="send_email" value="1" <?= $user->send_email ? 'checked="checked"' : '' ?> />
        </div>
    </div>
    <? if (!$user->isNew()): ?>
        <div>
            <label><?= translate('Register Date') ?></label>
            <div>
                <?= helper('date.format', array('date' => $user->created_on, 'format' => 'Y-m-d H:i:s')) ?>
            </div>
        </div>
        <div>
            <label><?= translate('Last signed in') ?></label>
            <div>
                <? if($user->last_visited_on == '0000-00-00 00:00:00') : ?>
                    <?= translate('Never') ?>
                <? else : ?>
                    <?= helper('date.format', array('date' => $user->last_visited_on, 'format' => 'Y-m-d H:i:s')) ?>
                <? endif ?>
            </div>
        </div>
    <? endif; ?>
</fieldset>
<fieldset>
    <legend><?= translate('Role') ?></legend>
    <div>
        <div><?= helper('select.groups', array('selected' => $user->role_id, 'name' => 'role_id')); ?></div>
    </div>
</fieldset><commit_msg>Do not allow a user to change a role of user that has a higher role or the same role.<commit_after><?
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */
?>

<fieldset>
    <legend><?= translate('System Information') ?></legend>
    <div>
        <label for="enabled"><?= translate('Enable User') ?></label>
        <div>
            <input <?= object('user')->getId() == $user->id ? 'disabled="disabled"' : ''?> type="checkbox" id="enabled" name="enabled" value="1" <?= $user->enabled ? 'checked="checked"' : '' ?> />
        </div>
    </div>
    <div>
        <label for="send_email"><?= translate('Receive System E-mails') ?></label>
        <div>
            <input type="checkbox" id="send_email" name="send_email" value="1" <?= $user->send_email ? 'checked="checked"' : '' ?> />
        </div>
    </div>
    <? if (!$user->isNew()): ?>
        <div>
            <label><?= translate('Register Date') ?></label>
            <div>
                <?= helper('date.format', array('date' => $user->created_on, 'format' => 'Y-m-d H:i:s')) ?>
            </div>
        </div>
        <div>
            <label><?= translate('Last signed in') ?></label>
            <div>
                <? if($user->last_visited_on == '0000-00-00 00:00:00') : ?>
                    <?= translate('Never') ?>
                <? else : ?>
                    <?= helper('date.format', array('date' => $user->last_visited_on, 'format' => 'Y-m-d H:i:s')) ?>
                <? endif ?>
            </div>
        </div>
    <? endif; ?>
</fieldset>
<? if(@object('user')->getRole() > $user->role_id) : ?>
<fieldset>
    <legend><?= translate('Role') ?></legend>
    <div>
        <div><?= helper('select.groups', array('selected' => $user->role_id, 'name' => 'role_id')); ?></div>
    </div>
</fieldset>
<? endif ?>
{'fraction_non_alphanumeric': 0.23145325203252032, 'fraction_numerical': 0.012703252032520325, 'mean_word_length': 2.3421052631578947, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 156, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '2279771', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1289, 'n_words': 259}