Skip to main content

Change details

Form to update the details of a user.

Route name

user_account_change_detail

URL pattern

/account/change-detail

Layout

Form

Module

MyAccount

Page class

change-details-form

Acceptance criteria

  • Redirects to https if ssl is enabled
  • Redirects to appropriate url if user adapter change details page is specified
  • Must have valid user session to view
  • Redirects to index if no valid user session
  • Redirects to user home if user adapter change details is disabled
  • Redirects to register authorisation if email has not been authorised
  • Breadcrumb includes user home
  • Form includes csrf token, email address field and save changes submit button
  • Salutation field, forename, surname, birthday, age, sex, occupation, company, address, city, county, postcode, country, telephone, mobile, fax, website, data protection and targetting question fields when enabled in register preferences
  • Fields are prefilled with user’s current details
  • Error message is shown if CSRF token invalid on submission
  • Error message is shown if email address is not a string in email address format
  • Error message is shown if email address matches a different registered user
  • Error message is shown if salutation is not one of Mr, Miss, Mrs, Ms, Mx, Dr or other
  • Error message is shown if forename is blank
  • Error message is shown if surname is blank
  • Error message is shown if birthday is not a valid date
  • Error message is shown if birthday is not in the past
  • Error message is shown if age is not a number
  • Error message is shown if sex is not one of “Male” or “Female”
  • Error message is shown if address is blank
  • Error message is shown if city is blank
  • Error message is shown if postcode is blank or includes non alphanumeric characters
  • Error message is shown if country is blank
  • Error message is shown if an answer is not supplied for targetting question
  • If errors are found, submitted values are shown in form fields
  • If no errors found, user details are updated
  • If user email is updated and email authentication is enabled, authentication email is sent
  • If user is updated, redirected to user home and success message shown
  • Breadcrumb includes user account link