IssuePattern for username
As per current codebase user is able to create pattern without using available pattern.

Solution
we should not allow user to save the invalid pattern. need to do validation while saving the configuration

f.e.g:
if user enters
vb
Not allowed

if user enters
vb-[patterrn_name]
which is accepted

Comments

xaiwant created an issue. See original summary.

xaiwant’s picture

Issue summary: View changes
xaiwant’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
n.kishorekumar’s picture

Assigned: n.kishorekumar » Unassigned
Status: Needs work » Needs review
StatusFileSize
new653 bytes

Implemented validation for admin config form...

Please find the patch

Status: Needs review » Needs work

The last submitted patch, 4: username_policy-2713369-4.patch, failed testing.

n.kishorekumar’s picture

Status: Needs work » Needs review
StatusFileSize
new653 bytes

Adding patch again

xaiwant’s picture

Assigned: Unassigned » xaiwant
xaiwant’s picture

Assigned: xaiwant » heykarthikwithu
Status: Needs review » Reviewed & tested by the community

working fine moving to RTBC
@heykarthikwithu, just change the message before committing the code

  if ($num_of_patterns == 0) {
    form_set_error('username_policy_pattern_error', 'Please enter at least one PATTERN ELEMENTS');
  }
heykarthikwithu’s picture

Title: Allow Pattern for username » Don't allow to create pattern without using available pattern.

heykarthikwithu’s picture

Assigned: heykarthikwithu » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.