Previous Topic: SearchesNext Topic: ODBC Support


User Password State

Password state refers to activities relating to a given user’s password—for example, the last time the password was changed, and the last time the password was used to log in the user. To retrieve an existing SmDmsUserPWState object for a user, or to set a new password state object with any attribute changes, call getUserPWState() or setUserPWState() in SmDmsUser.

The following table lists the password state attributes you can access for a given user, and the method used to set or retrieve an attribute value. All methods are in the class SmDmsUserPWState, unless otherwise noted.

Password State Attribute

Method

Description

Login failures

setLoginFailures()
getLoginFailures()

Sets or retrieves the number of times the user failed to log in since the user’s last successful login.

Last login time

setLastLoginTime()
getLastLoginTime()

Sets or retrieves the time the user last logged in successfully.

Previous login time

setPrevLoginTime()
getPrevLoginTime()

Sets or retrieves the next-to-last time the user logged in successfully.

Disabled time

setDisabledTime()
getDisabledTime()

Sets or retrieves the time the user object was disabled.

Password history

SmDmsUser.
setUserPWState()

Optionally, clears the user’s password history when setting the password state object for the user.

You cannot retrieve password history or set password history entries.

Last password change time

setLastPWChangeTime()
getLastPWChangeTime()

Sets or retrieves the time the user’s password was last changed.

If you change a password state attribute, the change applies to the current password state object only. To apply the change to a password state object that may be subsequently retrieved, pass the current password state object in a call to SmDmsUser.setUserPWState(). This method sets a new password state object containing the attribute values passed into the method.