Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A Facility with 'facility' id must exist
  • A Role with 'role' id must exist
  • A UserStatus with 'status' value must exist
  • 'password' must be longer than 5 characters and shorter than 20
  • If 'tagId' is not null, it must be unique among existing users
  • If 'tagId' is not null, it must be longer than 5 characters and shorter than 20
  • If 'pin' is not null, it must be unique among existing usersIf 'pin' is not null, it must be longer than 5 characters and shorter than 20
  • 'email' must be a well formed email
  • 'email' must be unique among existing users
  • 'username' must be unique among existing users

 

Info
The password and tag id pin of the created user is hashed using SHA1 algorithm before it is persisted in the database.

...

  • A Facility with 'facility' id must exist
  • A Role with 'role' id must exist
  • A UserStatus with 'status' value must exist
  • 'password' must be longer than 5 characters and shorter than 20
  • If 'pin' is not null, it must unique among existing users.If 'pin' is not null, it must be longer than 5 characters and shorter than 20
  • If 'tagId' is not null, it must unique among existing users.
  • If 'tagId' is not null, it must be longer than 5 characters and shorter than 20
  • If 'emai' is not null, 'email' must be a well formed email
  • If 'emai' is not null, 'email' must be unique among existing users.

...

Code Block
titleResult
collapsetrue
{
"data":{
"available":false,
"takenBy":"podb"
},
"statusFact":{
"success":true
}
}

 

Create User Name

Current Implementation

This API method can be used to create user name from first name first letter and last name. If created user name already exists in users table then add number to user name.

eg. psmith, psmith1

Parameters

Base URL: /createUserName
Parameters:

NameTypeMandatoryDescription
 firstNameString Yes First Name of user. 
lastNameStringYesLast Name of user.

 

API Sample

url 'http://localhost:8080/PresentationServices/createUserName?firstName=paul&lastName=paul

Code Block
languagejs
titleResult
collapsetrue
 {"data":{"lastName":"Poda","userName":"vPoda1","firstName":"vidant"},"statusFact":{"success":true}}