If a value for requested username is entered and the org unit setting
"opac.username_regex" has a value, the regex will be enforced just like
the other .regex org unit settings in use in self-reg.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
$ctx->{get_org_setting}->($ctx_org, 'ui.patron.edit.phone.regex')
unless $shash->{stgu}{day_phone}{regex};
+ # The regex OUS for username does not match the format of the other
+ # org settings. Wrangle it into place.
+ $shash->{stgu}{usrname}{regex} =
+ $ctx->{get_org_setting}->($ctx_org, 'opac.username_regex');
+
# some fields are assumed to be visible / required even without the
# presence of org unit settings. E.g. we obviously want the user to
# enter a name, since a name is required for ultimately creating a user