company logo

CTX_DataBase :: CheckLogin - Check user's login

The Login function can be overloaded in the application database context. The default implementation checks the extent passed in user_extent (ADM_User is default) for the given user name. The default order for this extent must be the user's login name.

When the user's name passed in user_name can be located in the users extent, the password is checked comparing the password passed in pwd with the content of the field pwd_name (password is the default).

When the password check completed successfully, the function returns the GUID for the user as user identification for later access.

Return value:  User identification ( NString  )

Implementation details

const NString & CTX_DataBase  :: CheckLogin ( NString &user_name, NString &pwd, NString &user_extent=NString::Null(), NString &pwd_name=NString::Null(), NString &user_id_name=NString::Null() )
  • user_name - User name
  • pwd - User's password
  • user_extent - Extent name for user administration

    The extent name for user administration can be chosen differently in an application.

    When no or an empty user extent name is passed, the default extent ADM_User is used.

    Default: NString::Null()
  • pwd_name - Field containing user's password information

    The field can be defined differently in an application depending on the defined data type for user administration.

    Default: NString::Null()
  • user_id_name - Property name for internal user identification

    The internal user id property can be defined differently in an application depending on the defined data type for user administration.

    Default: NString::Null()