Skip to content

clsUser

clsUser is the core BOF business object representing an external (non-employee) portal user. It manages identity, credential references, status flags, and the IsAuthorizedUser authorization data flag, and provides a range of retrieval methods for user search, forgot-user lookup, and provider identity lookup.

Purpose

  • Represent a single external user record backed by the EXT_USER table.
  • Provide CRUD lifecycle (BeforeInsert/BeforeRetrieve/BeforeUpdate via IBusinessCriteria) against Oracle.
  • Expose search and lookup helpers (GetUsers, GetUserBySourceSystemIdAndEmail, GetProvider, UpdateLastLogonDate).

Context

  • Namespace: SAIF.Business.External.Users*
  • Assembly/package: SAIF.BOF.Business.External.Users
  • Base class: clsBusinessBase (from SAIF.BOF.Framework)*

Public members

Member Signature Purpose
DAYS_EMAIL_VERIFICATION_VALID Public Const DAYS_EMAIL_VERIFICATION_VALID As Integer = 5 Set the number of days the email verification can be used before it expires. Note: Set when the user is activated, or the registation email is sent.
DAYS_PRODUCTION_TEST_USER_VALID Public Const DAYS_PRODUCTION_TEST_USER_VALID As Integer = 2 Set the number of days the test user can be used in production before it expires.
DAYS_TEST_USER_VALID Public Const DAYS_TEST_USER_VALID As Integer = 60 Set the number of days the test user can be used in non-production evironment before it expires.
UserSaved Public Event UserSaved(user As clsUser) This event is fired during the save if the email address has been modified.
ValidateAccessGroups Public Property ValidateAccessGroups As Boolean = True Gets or sets the validate access groups.*
AccessType Public Property AccessType As AccessTypes = AccessTypes.SAIFAdmin Gets or sets the access type.*
TempPassword Public ReadOnly Property TempPassword As String Gets or sets the temp password.*
CurrentUserTypeInfo Public ReadOnly Property CurrentUserTypeInfo As clsUserTypeInfo Returns information about the current user type.
CurrentUserType Public ReadOnly Property CurrentUserType() As clsUserType Returns the current user type that matches the one specified in current user type info.
IsCurrentUserTypeSteward Public ReadOnly Property IsCurrentUserTypeSteward As Boolean Returns true if the user is a steward for the current user type Note: Requires CurrentUserTypeInfo be set.
IsCurrentUserTypeAdmin Public Property IsCurrentUserTypeAdmin As Boolean Returns true if the user is an admin for the current user type Note: Requires CurrentUserTypeInfo be set.
IsCurrentUserTypeStewardYesNo Public ReadOnly Property IsCurrentUserTypeStewardYesNo As String Returns Y/N if the user is a steward for the current user type.
IsCurrentUserTypeAdminYesNo Public ReadOnly Property IsCurrentUserTypeAdminYesNo As String Returns Y/N if the user is the admin for the current medical provider.
SecurityQuestions Public ReadOnly Property SecurityQuestions As clsUserSecurityQuestionCollection Returns the set of security questions associated with the current user.
Types Public ReadOnly Property Types As clsUserTypeCollection Returns the set of usertypes associated with the current user.
StewardTypes Public ReadOnly Property StewardTypes As IEnumerable(Of clsUserType) Returns the set of usertypes for which the current user is a steward.
Contact Public ReadOnly Property Contact As clsContact Returns the contact associated with the currrent user.
MaskedContactName Public ReadOnly Property MaskedContactName As String Gets or sets the masked contact name.*
PhoneTypesMap Public ReadOnly Property PhoneTypesMap As clsPhoneTypesMap Returns a code map of all possible phone types.
EmailTypesMap Public ReadOnly Property EmailTypesMap As clsEmailTypesMap Returns a code map of all possble email types.
StatusCodesMap Public ReadOnly Property StatusCodesMap As clsStatusTypesMap Returns a code map of all possible statuses.
StatusCode Public ReadOnly Property StatusCode As String Status code (ACTIV, DIS, etc.) from EXT_USER_STATUS_CODE.*
StatusDescription Public ReadOnly Property StatusDescription As String Returns the status description for the current user.
FirstName Public Property FirstName As String Gets or sets the first name.*
Name Public ReadOnly Property Name As String Gets or sets the name.*
EmailAddress Public ReadOnly Property EmailAddress As String Gets or sets the email address.*
LastName Public Property LastName As String Gets or sets the last name.*
Email Public Property Email As String Gets/sets the contact's primary email Note: Changing the email will cause the IsVerified flag on EmailAddress to be set to false.
EmailTypeCode Public Property EmailTypeCode As String Gets/sets the type of email address being stored.
EmailType Public Property EmailType As EmailTypes Gets/sets the type of email address being stored.
EmailInfo Public ReadOnly Property EmailInfo As clsEmailAddressInfo Returns the email information associated with the contact.
PhoneInfo Public ReadOnly Property PhoneInfo As clsPhoneInfo Returns the phone information associated with the contact.
IsForeignPhone Public Property IsForeignPhone As Boolean Gets/sets the foreign phone flag.
PhoneTypeCode Public Property PhoneTypeCode As String Gets or sets the phone type code.*
PhoneType Public Property PhoneType As PhoneTypes Gets or sets the phone type.*
Phone Public Property Phone As String Gets or sets the phone.*
UserID Public Property UserID() As Decimal EXT_USER.EXT_USER_SEQ_NUM — primary key.*
Status Public Property Status() As StatusTypes Gets or sets the status.*
PasswordChangeRequired Public Property PasswordChangeRequired() As Boolean Gets/sets if the user must change their password at next login.
AcceptedUserAgreement Public Property AcceptedUserAgreement() As Boolean Gets/sets if the user has accepted the confidentiality agreement.
IsAuthorizedUser Public Property IsAuthorizedUser() As Boolean Persisted authorization flag mapped to AUTHORIZED_USER_FLAG; see BR-EU-01.*
EmailAddressID Public Property EmailAddressID() As Decimal Gets/sets the associated email address db seq num.
TestUserExpirationDate Public Property TestUserExpirationDate() As Date Gets/sets the expiration date when the test account can no longer be used.
EmailVerificationExpirationDate Public Property EmailVerificationExpirationDate() As Date Gets/sets the date when the email registration verification can no longer be used.
PreventSelfRegistrationInfo Public ReadOnly Property PreventSelfRegistrationInfo As clsUserDenySelfRegistration Gets or sets the prevent self registration info.*
PreventSelfRegistration Public Property PreventSelfRegistration() As Boolean Gets/sets if self-registration has been prevented for the current user.
HasClaimNotesAccess Public ReadOnly Property HasClaimNotesAccess As Boolean Returns true if the user has been given access to claim notes for any user type.
IsTestUser Public Property IsTestUser() As Boolean Gets/sets if the user is a test user account.
IsProdTestUser Public Property IsProdTestUser() As Boolean Gets/sets if the test user can be used in production environment.
IsActive Public ReadOnly Property IsActive() As Boolean Return TRUE for a ststus code NOT delete or disabled.
IsSubjectToExtract Public ReadOnly Property IsSubjectToExtract() As Boolean Return TRUE for extract of external user.
IsRelatedToInjuredWorker Public Property IsRelatedToInjuredWorker() As Boolean Gets or sets the is related to injured worker.*
UpdateUser Public ReadOnly Property UpdateUser() As String Gets or sets the update user.*
UpdateDate Public ReadOnly Property UpdateDate() As Date Gets or sets the update date.*
UpdateNum Public ReadOnly Property UpdateNum() As Decimal Optimistic-concurrency counter; see BR-EU-05.*
ContactID Public ReadOnly Property ContactID() As Decimal EXT_USER.PERSON_SEQ_NUM — linked person record.*
ActiveDirectoryID Public ReadOnly Property ActiveDirectoryID() As String Returns the AD userName.
LastLogonDate Public Property LastLogonDate() As clsSmartDate Gets or sets the last logon date.*
DisableDate Public ReadOnly Property DisableDate() As clsSmartDate Gets or sets the disable date.*
LastLogonDateValue Public ReadOnly Property LastLogonDateValue() As String Gets or sets the last logon date value.*
ProfileUpdateDate Public Property ProfileUpdateDate() As Date Gets/sets the date when the profile was last saved.
CreateUser Public ReadOnly Property CreateUser() As String Gets or sets the create user.*
CreateDate Public ReadOnly Property CreateDate() As Date Gets or sets the create date.*
SearchForCompanyName Public ReadOnly Property SearchForCompanyName As String Gets or sets the search for company name.*
CanTestUserLogin Public ReadOnly Property CanTestUserLogin(Optional IsDev As Boolean = False) As Boolean Gets or sets the can test user login.*
ProfileUpdateNeeded Public ReadOnly Property ProfileUpdateNeeded As Boolean Gets or sets the profile update needed.*
RegisterPropertiesForTracking Public Overrides Sub RegisterPropertiesForTracking() Performs the RegisterPropertiesForTracking action.*
NewUser Public Shared Function NewUser(ByVal inDataportal As IDataPortalInfo, e As clsNewUserArgs) As clsUser Executes the NewUser operation.*
GetUser Public Shared Function GetUser(ByVal inDataportal As IDataPortalInfo, inUserID As Decimal) As clsUser Retrieves user.*
StatusEnum Public Function StatusEnum(code As String) As StatusTypes Executes the StatusEnum operation.*
SetCurrentUserTypeInfo Public Sub SetCurrentUserTypeInfo(userType As UserTypes, sourceSystemID As String, sourceSystemGroupID As String) Sets current user type info.*
CheckUserIDAvailable Public Shared Function CheckUserIDAvailable(dpi As IDataPortalInfo, userID As String) As Boolean Executes the CheckUserIDAvailable operation.*
AddUserType Public Function AddUserType(userType As UserTypes, SourceSystemID As String, Title As String, Optional credential1 As String = "", Optional credential2 As String = "", Optional isSteward As Boolean = False, Optional accessType As AccessTypes = AccessTypes.Registration, Optional ByRef added As Boolean = False) As clsUserType Executes the AddUserType operation.*
AddUserTypeRules Public Function AddUserTypeRules(userType As clsUserType) As Boolean Executes the AddUserTypeRules operation.*
RemoveUserType Public Function RemoveUserType(userType As UserTypes) As Boolean Executes the RemoveUserType operation.*
AddSecurityQuestion Public Function AddSecurityQuestion(securityQuestionCode As String, answer As String) As clsUserSecurityQuestion Executes the AddSecurityQuestion operation.*
IsValid Public Overrides ReadOnly Property IsValid As Boolean Gets or sets the is valid.*
IsDirty Public Overrides ReadOnly Property IsDirty As Boolean Gets or sets the is dirty.*
GetForgottenUser Public Shared Function GetForgottenUser(inDataPortalInfo As IDataPortalInfo, SourceSystemID As String, email As String) As clsUser Retrieves forgotten user.*
ForgottenUserWhere Public Shared ReadOnly Property ForgottenUserWhere(inSourceSystemGroup As Boolean) As String Gets or sets the forgotten user where.*
GetUser Public Shared Function GetUser(ByVal inDataPortalInfo As IDataPortalInfo, inActiveDirectoryID As String) As clsUser Retrieves user.*
GetProvider Public Shared Function GetProvider(ByVal inDataPortalInfo As IDataPortalInfo, inExtUserTypeSeqNum As Decimal) As clsUser Retrieves provider.*
UpdateLastLogonDate Public Shared Function UpdateLastLogonDate(inDataPortalInfo As IDataPortalInfo, inActiveDirectoryID As String) As Boolean Executes the UpdateLastLogonDate operation.*

Inherited public members

Members in this section are inherited from BOF framework base types whose package/source files are present in this repository.

Additional data-binding members inherited through clsBindableBase could not be verified because that source file is not present in this repository.**

Member Signature Purpose Origin
MyGuid Public ReadOnly Property MyGuid() As String Gets or sets the my guid.* SAIF.BOF.Framework — clsBusinessBase
IsNew Public ReadOnly Property IsNew() As Boolean Gets or sets the is new.* SAIF.BOF.Framework — clsBusinessBase
IsDeleted Public ReadOnly Property IsDeleted() As Boolean Gets or sets the is deleted.* SAIF.BOF.Framework — clsBusinessBase
IsDirty Public Overridable ReadOnly Property IsDirty() As Boolean Gets or sets the is dirty.* SAIF.BOF.Framework — clsBusinessBase
SetValueOnChange Public Function SetValueOnChange(Of T)(ByRef inFieldValue As T, ByVal inSetValue As T, Optional ByVal inMarkDirty As Boolean = True) As Boolean Takes two values and compares them using the Equals function. If the values are different, it sets the inFieldValue = inSetValue, calls MarkDirty(), and returns True. Otherwise returns false. Enter the original Value Enter the new Value Enter False if you do not wish to mark the object as dirty. This is the equivalent of using the equality operator (=) on all structures. SAIF.BOF.Framework — clsBusinessBase
IsSavable Public Overridable ReadOnly Property IsSavable() As Boolean Gets or sets the is savable.* SAIF.BOF.Framework — clsBusinessBase
PreviousLinkItem Public ReadOnly Property PreviousLinkItem() As ILinkItem Implements ILinkItem.PreviousLinkItem Gets or sets the previous link item.* SAIF.BOF.Framework — clsBusinessBase
NextLinkItem Public ReadOnly Property NextLinkItem() As ILinkItem Implements ILinkItem.NextLinkItem Gets or sets the next link item.* SAIF.BOF.Framework — clsBusinessBase
SetPreviousLink Public Sub SetPreviousLink(ByRef inLinkItem As ILinkItem) Implements ILinkItem.SetPreviousLink Sets the Previous Item in Linked List. SAIF.BOF.Framework — clsBusinessBase
SetNextLink Public Sub SetNextLink(ByRef inLinkItem As ILinkItem) Implements ILinkItem.SetNextLink Sets the Next Item in a Linked List. SAIF.BOF.Framework — clsBusinessBase
InsertLinkAfter Public Sub InsertLinkAfter(ByRef inLinkItem As ILinkItem) Implements ILinkItem.InsertLinkAfter Inserts the item being passed in into the linked list after the current item. A Valid Business Object. SAIF.BOF.Framework — clsBusinessBase
InsertLinkBefore Public Sub InsertLinkBefore(ByRef inLinkItem As ILinkItem) Implements ILinkItem.InsertLinkBefore Inserts the item being passed in into the linked list prior to the current item. A Valid Business Object. SAIF.BOF.Framework — clsBusinessBase
RemoveLinks Public Sub RemoveLinks() Implements ILinkItem.RemoveLinks Removes this item from a linked list. Updates the members of the List on both sides of the item and then sets his internal next and previous link items to nothing. SAIF.BOF.Framework — clsBusinessBase
BeginEdit Public Sub BeginEdit() Starts a nested edit on the object. When this method is called the object takes a snapshot of its current state (the values of its variables). This snapshot can be restored by calling BusinessBase.CancelEdit or committed by calling BusinessBase.ApplyEdit. This is a nested operation. Each call to BeginEdit adds a new snapshot of the object's state to a stack. You should ensure that for each call to BeginEdit there is a corresponding call to either CancelEdit or ApplyEdit to remove that snapshot from the stack. SAIF.BOF.Framework — clsBusinessBase
CancelEdit Public Sub CancelEdit() Cancels the current edit process, restoring the object's state to its previous values. Calling this method causes the most recently taken snapshot of the object's state to be restored. This resets the object's values to the point of the last BusinessBase.BeginEditcall. [jimmil] 10/05/2006 Created. SAIF.BOF.Framework — clsBusinessBase
ApplyEdit Public Sub ApplyEdit() Commits the current edit process. Calling this method causes the most recently taken snapshot of the object's state to be discarded, thus committing any changes made to the object's state since the last BusinessBase.BeginEdit call. SAIF.BOF.Framework — clsBusinessBase
Delete Public Sub Delete() Marks the object for deletion. The object will be deleted as part of the next save operation. The Object Framework supports both immediate and deferred deletion of objects. This method is part of the support for deferred deletion, where an object can be marked for deletion, but isn't actually deleted until the object is saved to the database. This method is called by the UI developer to mark the object for deletion. To 'undelete' an object, use BusinessBase.BeginEdit before calling the Delete method. You can then use CancelEdit later to reset the object's state to its original values. This will include resetting the deleted flag to False. SAIF.BOF.Framework — clsBusinessBase
Clone Public Function Clone() As Object _ Implements ICloneable.Clone Returns a new object containing the exact data of the original object. It should be noted that the cloned object does not have access to the Data Access Layer. SAIF.BOF.Framework — clsBusinessBase
ValidateOnDelete Public Property ValidateOnDelete() As Boolean Gets or Sets whether Business Rules are Validated on a Deleted Object. By Default this property is set to False. SAIF.BOF.Framework — clsBusinessBase
Rules Public ReadOnly Property Rules() As clsRulesManager Gets or sets the rules.* SAIF.BOF.Framework — clsBusinessBase
IsValid Public Overridable ReadOnly Property IsValid() As Boolean Gets or sets the is valid.* SAIF.BOF.Framework — clsBusinessBase
ErrorCount Public ReadOnly Property ErrorCount() As Integer Gets or sets the error count.* SAIF.BOF.Framework — clsBusinessBase
ErrorMessages Public ReadOnly Property ErrorMessages() As String() Gets or sets the error messages.* SAIF.BOF.Framework — clsBusinessBase
WarningCount Public ReadOnly Property WarningCount() As Integer Gets or sets the warning count.* SAIF.BOF.Framework — clsBusinessBase
WarningMessages Public ReadOnly Property WarningMessages() As String() Gets or sets the warning messages.* SAIF.BOF.Framework — clsBusinessBase
InformationalCount Public ReadOnly Property InformationalCount() As Integer Gets or sets the informational count.* SAIF.BOF.Framework — clsBusinessBase
InformationalMessages Public ReadOnly Property InformationalMessages() As String() Gets or sets the informational messages.* SAIF.BOF.Framework — clsBusinessBase
Save Public Overridable Function Save() As Boolean Saves the object to the database. Calling this method starts the save operation, causing the object to be inserted, updated or deleted within the database based on the object's current state. If BusinessBase.IsDeleted is True the object will be deleted. Otherwise, if BusinessBase.IsNew is True the object will be inserted. Otherwise the object's data will be updated in the database. All this is contingent on BusinessBase.IsDirty. If this value is False, no data operation occurs. It is also contingent on BusinessBase.IsValid. If this value is False an exception will be thrown to indicate that the UI attempted to save an invalid object. It is important to note that this method returns a new version of the business object that contains any data updated during the save operation. You MUST update all object references to use this new version of the business object in order to have access to the correct object data. You can override this method to add your own custom behaviors to the save operation. For instance, you may add some security checks to make sure the user can save the object. If all security checks pass, you would then invoke the base Save method via MyBase.Save(). SAIF.BOF.Framework — clsBusinessBase
SaveChild Public Overridable Function SaveChild() As Boolean Saves the child object to the database. Calling this method starts the save operation, causing the object to be inserted, updated or deleted within the database based on the object's current state. If BusinessBase.IsDeleted is True the object will be deleted. Otherwise, if BusinessBase.IsNew is True the object will be inserted. Otherwise the object's data will be updated in the database. All this is contingent on BusinessBase.IsDirty. If this value is False, no data operation occurs. It is also contingent on BusinessBase.IsValid. If this value is False an exception will be thrown to indicate that the UI attempted to save an invalid object. It is important to note that this method returns a new version of the business object that contains any data updated during the save operation. You MUST update all object references to use this new version of the business object in order to have access to the correct object data. You can override this method to add your own custom behaviors to the save operation. For instance, you may add some security checks to make sure the user can save the object. If all security checks pass, you would then invoke the base Save method via MyBase.SaveChild(). SAIF.BOF.Framework — clsBusinessBase
XMLElementName Public Property XMLElementName() As String Returns the Value used as the TagName when generating XML. SAIF.BOF.Framework — clsBusinessBase
GetDataset Public Sub GetDataset(ByRef inDS As DataSet) Performs the GetDataset action.* SAIF.BOF.Framework — clsBusinessBase
GetDataset Public Sub GetDataset(ByRef inDS As DataSet, ByVal inTableName As String) Performs the GetDataset action.* SAIF.BOF.Framework — clsBusinessBase
GetReportXML Public Function GetReportXML(ByVal inElementName As String) As String Retrieves report xml.* SAIF.BOF.Framework — clsBusinessBase
GetReportXML Public Function GetReportXML() As String Retrieves report xml.* SAIF.BOF.Framework — clsBusinessBase
ToXml Public Function ToXml() As String Executes the ToXml operation.* SAIF.BOF.Framework — clsBusinessBase
ToXml Public Function ToXml(ByVal inTagName As String) As String Executes the ToXml operation.* SAIF.BOF.Framework — clsBusinessBase
DumpState Public Sub DumpState() Writes the object's field data into the debugger output window in VS.NET. [jimmil] 10/04/2006 Created. SAIF.BOF.Framework — clsUndoableBase
AllowCache Public Property AllowCache() As Boolean Implements IBusinessObject.AllowCache Gets or sets the allow cache.* SAIF.BOF.Framework — clsUndoableBase

Behavioral notes

  • INSERT binds 21 parameters to EXT_USER; UPDATE binds 19 parameters with optimistic-concurrency check (AND update_num = :UpdateNum), per BR-EU-05.*
  • Duplicate email is checked via SQL-016 before insert/update, enforcing BR-EU-04.*
  • IsAuthorizedUser flag is persisted but not enforced within this library — enforcement is deferred to the calling application, per BR-EU-01.*
  • GetUsers search overload (SQL-020) assembles a dynamic query with optional predicates for name, email, type, status, customer, and access group.*
  • A nested clsUserCollection class (inheriting clsBusinessCollection(Of clsUser)) is defined in the same file and returned by factory methods.*

Constraints and usage notes

  • No delete operation is exposed on clsUser; account lifecycle is managed through status codes.*
  • Schema owner for EXT_USER is unqualified in all SQL; the actual Oracle schema is not determinable from this library.**

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business.External.Users\clsUser.vb
  • Legacy\BusinessObjectFramework\clsBusinessBase.vb
  • Legacy\BusinessObjectFramework\clsUndoableBase.vb
  • Services\SAIF.Services.Printing.Remote\packages\SAIF.BOF.Framework.2.0.22103.3\src\SAIF.BOF.Framework.Core\V1\BaseItems\clsBusinessBase.vb
  • Services\SAIF.Services.Printing.Remote\packages\SAIF.BOF.Framework.2.0.22103.3\src\SAIF.BOF.Framework.Core\V1\BaseItems\clsUndoableBase.vb