Ticket #146 (closed patch: fixed)

Opened 1 year ago

Last modified 1 year ago

usernames up to 20 characters

Reported by: ewout Assigned to: dramirez
Priority: normal Milestone: 0.9
Component: core Version:
Severity: normal Keywords:
Cc: rho Patch Included:
Review Stage:

Description

Until we have a centralized valid_elgg_username function somewhere, let's at least allow up to 20 characters. The database column is a varchar(128) so no problem there, I guess

Attachments

20charusername.diff (4.0 kB) - added by ewout on 11/10/07 21:35:57.
011_validate_username_password_functions.diff (11.6 kB) - added by rho on 11/11/07 21:36:32.
updated patch, includes auth/ldap updates

Change History

11/10/07 21:35:57 changed by ewout

  • attachment 20charusername.diff added.

11/11/07 17:16:12 changed by dramirez

  • milestone set to 0.9.

The patch would be improved if we can the username size with some config property.

11/11/07 17:19:28 changed by dramirez

  • owner changed from misja to dramirez.

11/11/07 18:43:11 changed by rho

I added a patch that adds new functions:

  • maxusers_limit()
  • validate_username($username)
  • username_is_available($username)
  • validate_password($password1, $password2)

Also check for:

  • $CFG->username_minchars / $CFG->username_maxchars
  • $CFG->password_minchars / $CFG->password_maxchars

11/11/07 19:49:52 changed by ewout

Rolando, your patch looks good. Also look at auth/ldap/lib.php , which uses its own username validation. What about that?

11/11/07 21:36:32 changed by rho

  • attachment 011_validate_username_password_functions.diff added.

updated patch, includes auth/ldap updates

11/11/07 21:37:52 changed by rho

thanks ewout for pointed that, i'd updated the patch.

11/11/07 21:39:34 changed by rho

  • cc set to rho.

11/12/07 21:19:51 changed by misja

The changes and enhancements look good to me - thumbs up here.

11/13/07 00:07:29 changed by rho

  • status changed from new to closed.
  • resolution set to fixed.