Re: Web Security Functions
Other than not being redirected to where I want (yet), this saves user values to both security and my local user tables.
Jerry and Steve, thanks again for the help....Bob
Here�s what I did:
In the interactive window:
?a5ws_get_guid_from_group("Client",.T.)
= "637fc9579ac54cf1bc33409f69f1b99c"
?a5ws_get_guid_from_group("Office",.T.)
= "0a5bddc7fc074202beb118c049bd0f11"
In my after validate page:
a5ws_get_user_values(CurrentForm,request)
dim tbl as p
tbl=table.open("usersX")
tbl.index_primary_put("id")
recnum = tbl.fetch_find(alltrim(CurrentForm.Controls.userid))
IF (recnum>0) THEN
'do nothing since security will not allow duplicates
' this dialog is for adding, not updating
else
tbl.enter_begin()
tbl.EnterDate = date()
dim utype as C
IF ((currentform.controls.groups.value)= "637fc9579ac54cf1bc33409f69f1b99c") THEN
utype = "Client"
else 'do nothing
end if
IF ((currentform.controls.groups.value)= "0a5bddc7fc074202beb118c049bd0f11") THEN
utype = "Office"
else 'do nothing
end if
tbl.UserType = utype
tbl.FName = currentform.controls.fname.value
tbl.LName = currentform.controls.lname.value
tbl.Email = currentform.controls.email.value
tbl.enter_end()
end if
request.variables.ulink = tbl.Id
tbl.close()
a5ws_save_user_values(CurrentForm,request)
CurrentForm.RedirectTarget = "clientX.a5w"
Other than not being redirected to where I want (yet), this saves user values to both security and my local user tables.
Jerry and Steve, thanks again for the help....Bob
Here�s what I did:
In the interactive window:
?a5ws_get_guid_from_group("Client",.T.)
= "637fc9579ac54cf1bc33409f69f1b99c"
?a5ws_get_guid_from_group("Office",.T.)
= "0a5bddc7fc074202beb118c049bd0f11"
In my after validate page:
a5ws_get_user_values(CurrentForm,request)
dim tbl as p
tbl=table.open("usersX")
tbl.index_primary_put("id")
recnum = tbl.fetch_find(alltrim(CurrentForm.Controls.userid))
IF (recnum>0) THEN
'do nothing since security will not allow duplicates
' this dialog is for adding, not updating
else
tbl.enter_begin()
tbl.EnterDate = date()
dim utype as C
IF ((currentform.controls.groups.value)= "637fc9579ac54cf1bc33409f69f1b99c") THEN
utype = "Client"
else 'do nothing
end if
IF ((currentform.controls.groups.value)= "0a5bddc7fc074202beb118c049bd0f11") THEN
utype = "Office"
else 'do nothing
end if
tbl.UserType = utype
tbl.FName = currentform.controls.fname.value
tbl.LName = currentform.controls.lname.value
tbl.Email = currentform.controls.email.value
tbl.enter_end()
end if
request.variables.ulink = tbl.Id
tbl.close()
a5ws_save_user_values(CurrentForm,request)
CurrentForm.RedirectTarget = "clientX.a5w"
Comment