| || |
Password Reset for Non-Admin Users
Trying to modify OTA workflow so that
a)Users with blank passwords are forced to create a non-blank password upon accessing their project
b)Non-Admin Users who have forgotten their password can reset it by having QC email out their current password (or a random temporary one)
Appreciate any help on this.
Re: Password Reset for Non-Admin Users
Here is the workflow script to set the password if user tried to login with blank password,Add this code in common script in project_canLogin function.
Function Project_CanLogin(DomainName, ProjectName, UserName)
On Error Resume Next
Project_util_debug_msgbox "Project_CanLogin, DomainName = " & DomainName & ", ProjectName = " & ProjectName & ", UserName = " & UserName
if TDConnection.Password = "" then
sNewPass = ""
prompttext = "Quality Center requires each user to have a password."
prompttext = prompttext & (chr(13) & chr(10)) & (chr(13) & chr(10))
prompttext = prompttext & "Please enter a new password below."
sNewPass = Trim( InputBox(prompttext, "Change Password") )
If sNewPass <> "" then
Set tdc = TDConnection
Set cust = tdc.Customization
Set custusers = cust.Users
Set custuser = custusers.User(UserName)
custuser.Password = sNewPass
Set tdc = Nothing
Project_CanLogin = True
Project_CanLogin = False
Project_CanLogin = Project_DefaultRes
On Error GoTo 0