CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 what is the variable for user_id ccs

Print topic Send  topic

Author Message
kana
Posted: 05/02/2002, 10:49 PM

Hi,

I use the codecharge studio to build a change password page. By default, I would like to retrieve the current login user user_id. May I know in CCS what is the name for the current user_id.
kana
Posted: 05/02/2002, 11:03 PM

I think I get this working by using the CCGetSession("UserID").

Now my problem is how could I compare the new password with the confirmed new password
Alex Alexapolsky
Posted: 05/03/2002, 2:16 AM

Use CCGetUserID function
e_madero
Posted: 10/24/2002, 9:34 AM

Hello,

You must create a record allowing Update (that goes to make the update to the login table), on the "Before Update" event of the record you will have to add acode like this:

Dim a, b
a=cstr(request("PWD_new_1")
b=cstr(request("PWD_new_2")

if ((StrComp(a,b,0)=0)) then


e_madero
Posted: 10/24/2002, 9:34 AM

Hello,

You must create a record allowing Update (that goes to make the update to the login table), on the "Before Update" event of the record you will have to add acode like this:

Dim a, b
a=cstr(request("PWD_new_1")
b=cstr(request("PWD_new_2")

if ((StrComp(a,b,0)=0)) then


e_madero
Posted: 10/24/2002, 9:39 AM

As iwas saying you will have to add code in the Before Update event of teh record:

Function Login_BeforeUpdate

Dim a, b
a=cstr(request("PWD_NEW_1"))
b=cstr(request("PWD_NEW_2"))

if((StrComp(a,b,0)=0)) then
Login_BeforeUpdate = 1
else
Login_BeforeUpdate = 0
end if

End Function

If the two passwords are the same this function will return 1 otherwise it will return 0

Now, you must go to the function: UpdateRow of your page and modify the code to cath the answer of the above function, something like this:

Function UpdateRow()
CCSEventResult=CCraiseEvet(CCSEvents, "BeforeUpdate", Me)
if (CCSEventResult) then
DataSource.ActualPWD.Value = PWD_NEW_1.Value
' YOU asign the new password value to the old value password
' (this field willbe updated in the table) or you can make a
' Custom Update to put the value of PWD_NEW_1 on the table
DataSource.Update(Command) 'this execute the update
if (DataSource.Errors.Count >0) then
'manage the errors of the update
end if
UpdateRow =(Errors.Count = 0)
else
Errors.AddError "Passwords given are different. They must match!!"
end if
End Function

This is working fine for me, I hope this will help you

Enrique
Gene
Posted: 01/04/2003, 1:59 PM

It's not working. What's the problem?

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.