<commit_before><div class="btn-group">
    <a href="{{ path('useredit', {'id': user.id}) }}" class="btn btn-default btn-xs">
            <i class="fa fa-edit"></i> {{ __('Edit') }}
    </a>

    <button type="button" class="btn dropdown-toggle btn-default btn-xs" data-toggle="dropdown">
        <i class="fa fa-info-sign"></i>
        <span class="caret"></span>
    </button>

    <ul class="dropdown-menu pull-right">
        {% if context.currentuser.id != user.id  %}
            {% if user.enabled %}
                <li>
                    <form action="{{ path('useraction', {'action': 'disable', 'id': user.id}) }}" method="post">
                        {% include('_sub/_csrf_token.twig') %}
                        <button type="submit" class="btn btn-block btn-link">
                            <span class="pull-left">{{ __('Disable %username%',{'%username%':user.displayname}) }}</span>
                        </button>
                    </form>
                </li>
            {% else %}
                <li>
                    <form action="{{ path('useraction', {'action': 'enable', 'id': user.id}) }}" method="post">
                        {% include('_sub/_csrf_token.twig') %}
                        <button type="submit" class="btn btn-block btn-link">
                            <span class="pull-left">{{ __('Enable %username%',{'%username%':user.displayname}) }}</span>
                        </button>
                    </form>
                </li>
            {% endif %}
            <li>
                <form action="{{ path('useraction', {'action': 'delete', 'id': user.id}) }}" method="post">
                    {% include('_sub/_csrf_token.twig') %}
                    <button type="submit" class="btn btn-block btn-link confirm"
                    data-confirm="{{ __('Are you sure you want to delete %username%?',{'%username%':user.displayname}) }}" >
                        <span class="pull-left">{{ __('Delete %username%',{'%username%':user.displayname}) }}</span>
                    </button>
                </form>
            </li>

            <li class="divider">
            </li>
        {% endif %}

        <li>
            <a class="nolink">
                {{ __('Last seen') }}: <strong>{% if user.lastseen>"1000" %}{{ user.lastseen|date("Y-m-d H:i") }}{% else %}-{% endif %}</strong>
            </a>
        </li>

        <li>
            <a class="nolink">
                {{ __('Last known IP') }}: <strong>{% if user.lastip!="" %}{{ user.lastip }}{% else %}-{% endif %}</strong>
            </a>
        </li>
    </ul>
</div><commit_msg>Show profile button on users page, if not allowed to edit other users than yourself<commit_after>{% if isallowed('useredit') %}
    <div class="btn-group">
    <a href="{{ path('useredit', {'id': user.id}) }}" class="btn btn-default btn-xs">
            <i class="fa fa-edit"></i> {{ __('Edit') }}
    </a>

    <button type="button" class="btn dropdown-toggle btn-default btn-xs" data-toggle="dropdown">
        <i class="fa fa-info-sign"></i>
        <span class="caret"></span>
    </button>

    <ul class="dropdown-menu pull-right">
        {% if context.currentuser.id != user.id  %}
            {% if user.enabled %}
                <li>
                    <form action="{{ path('useraction', {'action': 'disable', 'id': user.id}) }}" method="post">
                        {% include('_sub/_csrf_token.twig') %}
                        <button type="submit" class="btn btn-block btn-link">
                            <span class="pull-left">{{ __('Disable %username%',{'%username%':user.displayname}) }}</span>
                        </button>
                    </form>
                </li>
            {% else %}
                <li>
                    <form action="{{ path('useraction', {'action': 'enable', 'id': user.id}) }}" method="post">
                        {% include('_sub/_csrf_token.twig') %}
                        <button type="submit" class="btn btn-block btn-link">
                            <span class="pull-left">{{ __('Enable %username%',{'%username%':user.displayname}) }}</span>
                        </button>
                    </form>
                </li>
            {% endif %}
            <li>
                <form action="{{ path('useraction', {'action': 'delete', 'id': user.id}) }}" method="post">
                    {% include('_sub/_csrf_token.twig') %}
                    <button type="submit" class="btn btn-block btn-link confirm"
                    data-confirm="{{ __('Are you sure you want to delete %username%?',{'%username%':user.displayname}) }}" >
                        <span class="pull-left">{{ __('Delete %username%',{'%username%':user.displayname}) }}</span>
                    </button>
                </form>
            </li>

            <li class="divider">
            </li>
        {% endif %}

        <li>
            <a class="nolink">
                {{ __('Last seen') }}: <strong>{% if user.lastseen>"1000" %}{{ user.lastseen|date("Y-m-d H:i") }}{% else %}-{% endif %}</strong>
            </a>
        </li>

        <li>
            <a class="nolink">
                {{ __('Last known IP') }}: <strong>{% if user.lastip!="" %}{{ user.lastip }}{% else %}-{% endif %}</strong>
            </a>
        </li>
    </ul>
</div>
{% elseif context.currentuser.id == user.id %}
    <a href="{{ path('profile') }}" class="btn btn-default btn-xs">
        <i class="fa fa-edit"></i> {{ __('Profile') }}
    </a>
{% endif %}
{'fraction_non_alphanumeric': 0.20347574221578565, 'fraction_numerical': 0.001448225923244026, 'mean_word_length': 1.6410133843212238, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 113, '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': '812379', 'n_tokens_mistral': 1671, 'n_tokens_neox': 1558, 'n_words': 337}