Remove space in autogenerated username during self-registration

Bug #1940020 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Dianne Tennent

Bug Description

When someone self-registers on the site and has a space in their first or last name, Mahara keeps that and suggests it in the pre-filled username and allows for it to be created even though the description says that the username can't contain spaces. That is causing problems when people are trying to log in as the username is not recognised correctly.

To replicate:

1. Turn on self-registration for the site in the institution settings. Leave 'Confirm registration' turned on.
2. Self-register and put a space in the first name and the last name, e.g. first name: 'Te Aroha'. last name 'Parker Jones'.
3. Approve the account as administrator.
4. As the new account holder, click the registration link to complete your self-registration.

Expected result: There are no spaces in the username.
Actual result: There are spaces in the username and when the form is completed, Mahara doesn't complain.

Tags: bite-sized
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Leaving this here for Dianne to fix.

Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Dianne Tennent (dianne-t)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11977

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11977
Committed: https://git.mahara.org/mahara/mahara/commit/e2fffebeb8ca49dc1bcf5e3b0ea583d26d62922c
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit e2fffebeb8ca49dc1bcf5e3b0ea583d26d62922c
Author: Dianne Tennent <email address hidden>
Date: Tue Sep 7 14:56:30 2021 +1200

Bug 1940020: Remove space in autogenerated username during self-registration

Change-Id: Idec6a145b8e51332eff1fd1350ade70693aa8d2a

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.