Chapter 6. The User Object definition - class nsdUser

Table of Contents

Object properties
Object methods
get([$load=1])
add([$load=1],[$reason="ownership"])
delete([$load=1],[$reason="ownership"])
undelete([$load=1],[$reason="ownership"])
update([$load=1],[$passupdate=false],[$unlock=false],[$reason="ownership"])
getuname($uid)
tsig($user,$password,[$userstorage=1])
login($user,$password,[$module="NSD"],[$userstorage=1])

Location: nosod.lib

This class has for goal to provide user object definition to the application. Everything related to a user must be processed through this class, for reliability reasons.

Principle:

Every user definition is stored in the system database, as an XML document of type 'user'. So this class uses the nsdDoc class as storage engine, with document type 'usr'. Objects are stored in tables nsduser(master), nsdusers(versions) and nsduseri(exported indexes) tables.

Object properties

  • uid - User identifier (unique number)
  • uname - Username (part of the user e-signature, in the loggin)
  • password - User's password (one way crypted value of the password)
  • lastname - User's lastname
  • firstname - USer's firstname
  • initials - User's initials
  • email - User's email address
  • title - User's such IT Responsible, Administrator,...
  • address - User's address
  • zip - User's address zip code
  • state - User's address state
  • city - User's address city
  • country - User's address country
  • company - User's company name
  • department - User's company department (eg Quality Assurance)
  • businessunit - User's company businessunit (eg Admin services)
  • phone - User's phone number
  • gender - User's gender (Male/Female)
  • active - User's account activated or disabled (boolean)
  • start - Account starting date
  • end - Account end date
  • list - list of XML attirbutes exported as index
  • defaultmodule - User's default module initials
  • defaultmoduleversion - User's defualt module version
  • error - error message when a method call has failed