Bug #23288 Bug Fixed

Member Import Utility / Confirm Import displays string format code instead of a number when reporting a Username length error

Version: 3.5.12 Reporter: riko

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

Minimum username length is currently set to 4 in Security & Privacy menu.

Click on Developer -> Utilities

Click on Member Import

Member Group set to Members

XML file location set to: system/test.xml

Click Import Members

Click Confirm Import

Error message displays:

An error occurred

Your username must be at least %d characters long (Username: 'abc' - within user record 'abc')

The expected result should display a number in place of the

%d

.

Contents of test.xml:

This is the same as the User Guide example except the username has been shortened to 3 characters.

<members>
        <member>
                <username>abc</username>
                <screen_name>Brett Bretterson</screen_name>
                653132ffd94b986bf2bb806b3c67d190</password>
                <email>brett@example.com</email>
        </member>
</members>
  • In v3 it’s in system/ee/legacy/libraries/Validate.php around line 131:

    <pre><code> $this->errors[] = str_replace(‘%x’, $len, ee()->lang->line(‘username_too_short’)); replace with $this->errors[] = sprintf(lang(‘username_too_short’), $len);

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases