How change password (OpenInsight Specific)
At 08 DEC 2000 09:51:46PM Barry Stevens wrote:
I have written a dialog box for a Change password option for users.
I tried to use CREATE_USER with the following code on the 'OK' button CLICK event:
declare subroutine msg, send_event, create_user, post_event
declare function Get_Status
Pass1=.PASS1-]DEFPROP
Pass2=.PASS2-]DEFPROP
if len(Pass1) GE 6 and len(Pass2) LE 20 else
msg(@Window,"Password length is incorrect":@fm:@fm:@fm:"H")send_event(@Window,"CLEAR")return 0end
if Pass1=Pass2 else
msg(@Window,"Passwords entered are different":@fm:@fm:@fm:"H")send_event(@Window,"CLEAR")return 0end
Create_User(@Username, Pass1,@Admin)
if Get_Status(ErrCodes) then
msg(@Window,"System Change password routine returned error code ":ErrCodes:@fm:@fm:@fm:"H")return 0end
post_event(@Window,"CLOSE")
RETURN 0
;BUT I get the following error msg when drops to debugger.
SYS1500 Primary Row Locked TABLE CREATE_USER Key 2
Can anyone help, Should I be doing this diffently.
At 09 DEC 2000 06:59AM Oystein Reigem wrote:
Barry,
I found out once that the 4th parameter (overwrite flag) is necessary when you use Create_User programmatically. Even when you create a new user (flag=0). Not just when you change an existing one (flag=1).
And what's that @Admin parameter of yours? You need something with a value of 1 to set admin level.
- Oystein -
At 09 DEC 2000 07:46PM Barry Stevens wrote:
]]And what's that @Admin parameter of yours? You need something with a value of 1 to set admin level.«
@Admin holds the Admin level - I didnt want to change it, but I thought I had better supply it in case if I had null, it might clear or give error.
Thanks for your help
Barry