• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Hyphen in user names

Gambalunga

💖 Chevereto Fan
I really need to have the possibility of hyphens in user names. I have copied my modified theme files to /app/themes/Peafowl/overrides this simply modifies the mouse-over tooltip.

The two files concerned are:
/app/themes/Peafowl/views/signup.php
and
/app/themes/Peafowl/views/settings.php
In order to actually get the hyphen accepted I have made a small mod to \app\lib\classes\class.settings.php but this can not be read in overrides.
Can anyone suggest how I can get an overide of the class settings?

The line numbers will be out of date but the mod is described below.

Line 186 in \app\lib\classes\class.settings.php has been modified as follows to include the "-" (hyphen) character in the user names pattern.
Code:
'username_pattern'           => '^[\w-]{3,16}$',// - added after w

I then modified the two files where I found the tool tip:
Line 40 (comment line 41) in /app/themes/Peafowl/views/signup.php
Code:
<input type="text" name="username" id="signup-username" class="text-input" autocomplete="off" value="<?php echo get_safe_post()["username"]; ?>" pattern="<?php echo CHV\getSetting('username_pattern'); ?>" rel="tooltip" title='<?php _se('%i to %f characters<br>Letters, numbers, "-" and "_"', ['%i' => CHV\getSetting('username_min_length'), '%f' => CHV\getSetting('username_max_length')]); ?>' data-tipTip="right" placeholder="<?php _se('Username'); ?>" required>
                   <?php /* tooltip modified to include "-" */?>
And
Line in 144 in /app/themes/Peafowl/views/settings.php
Code:
<input type="text" name="username" id="username" maxlength="<?php echo CHV\getSetting('username_max_length'); ?>" class="text-input" value="<?php echo get_safe_post() ? get_safe_post()["username"] : get_user()["username"]; ?>" pattern="<?php echo CHV\getSetting('username_pattern'); ?>" rel="tooltip" title='<?php _se('%i to %f characters<br>Letters, numbers, "-" and "_"', ['%i' => CHV\getSetting('username_min_length'), '%f' => CHV\getSetting('username_max_length')]); ?>' data-tipTip="right" placeholder="<?php _se('Username'); ?>" required>

Note in both cases the words
Letters, numbers and "_"
have been modified to
Letters, numbers, "-" and "_"
 
Back
Top