engagementlab / CivicSeed

Civic social training on steroids for students.
Other
9 stars 4 forks source link

Customizable URL for resume/profile #193

Open louh opened 10 years ago

louh commented 10 years ago

Changing the profileLink setting of the user's account will allow the user to customize their profile URL. Currently that setting is randomly generated when the user profile is created. Once customized, it's safe to assume that we can lose that randomly generated string. In the customization UI warn the user that their previous link will no longer be active.

A few things should happen when a user chooses to customize that setting:

  1. Sanitize the input to only allow A-Z (lower case and uppercase), numerals 0-9, and the hyphen (-) and (_) underscore characters. No spaces, trim whitespace.
  2. Prevent inputs greater than a certain length (let's say 24 characters)
  3. Prevent inputs less than a certain length (let's say 6 characters)
  4. Check to make sure that the name is not already taken, and prevent someone from submitting it if it is.
louh commented 9 years ago

Work in progress as of d4efe55592c0b8144efcf059646b08bfde2d3d3c.

Some other things to think through, after saving a new link: