<commit_before><?php
/**
 * @title          Autocomplete Username File
 * @desc           This file can suggest a list of user name with jQuery and Ajax.
 *
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Asset / Ajax
 * @version        1.0
 */

namespace PH7;

defined('PH7') or exit('Restricted access');

use PH7\Framework\Layout\Html\Design;
use PH7\Framework\Mvc\Request\Http;
use PH7\Framework\Session\Session;

// Only for members
if (UserCore::auth()) {
    $oHttpRequest = new Http;

    if ($oHttpRequest->postExists('username')) {
        if ($oUsernameResult = (new UserCoreModel)->getUsernameList($oHttpRequest->post('username'))) {
            // XML tags
            echo '<users><ul>';
            foreach ($oUsernameResult as $oList) {
                // Do not include the user profile that is connected since it doesn't make sense.
                if ($oList->profileId == (new Session)->get('member_id')) break;

                echo '<li>
                        <username>', escape($oList->username, true), '</username>
                        <avatar>', (new Design)->getUserAvatar($oList->username, $oList->sex, 32), '</avatar>
                      </ul>';
            }
            echo '</ul></users>';
        }
    }

    unset($oHttpRequest);
}
<commit_msg>Remove redundant version info in class header comment<commit_after><?php
/**
 * @title          Autocomplete Username File
 * @desc           This file can suggest a list of user name with jQuery and Ajax.
 *
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Asset / Ajax
 */

namespace PH7;

defined('PH7') or exit('Restricted access');

use PH7\Framework\Layout\Html\Design;
use PH7\Framework\Mvc\Request\Http;
use PH7\Framework\Session\Session;

// Only for members
if (UserCore::auth()) {
    $oHttpRequest = new Http;

    if ($oHttpRequest->postExists('username')) {
        if ($oUsernameResult = (new UserCoreModel)->getUsernameList($oHttpRequest->post('username'))) {
            // XML tags
            echo '<users><ul>';
            foreach ($oUsernameResult as $oList) {
                // Do not include the user profile that is connected since it doesn't make sense.
                if ($oList->profileId == (new Session)->get('member_id')) break;

                echo '<li>
                        <username>', escape($oList->username, true), '</username>
                        <avatar>', (new Design)->getUserAvatar($oList->username, $oList->sex, 32), '</avatar>
                      </ul>';
            }
            echo '</ul></users>';
        }
    }

    unset($oHttpRequest);
}

{'fraction_non_alphanumeric': 0.14048488874128195, 'fraction_numerical': 0.01262039189637994, 'mean_word_length': 2.170526315789474, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 49, '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': '2498463', 'n_tokens_mistral': 872, 'n_tokens_neox': 829, 'n_words': 245}