11/22/2024 9:55:45 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
|
|
|
|
encrypting webpassword through a custom page
Posted: 29 Feb 08 1:09 PM
|
Hi guys,
In a custom Lead capture type page that I am making, I have a form with just basic contact info fields (email, password, verify password, first and last name)
What I want is for a person to fill in these fields and then have my page insert the record into the SLX DB as a contact (account is just filled in with the last, firstname, for the account name) and grant the new Contact, web access permissions.
I can insert the data into the DB with no problems, but I'm having some trouble with the password encryption and being able to log in as a new contact.
for my contact creation i use this:
IContact con = Sage.Platform.EntityFactory.Create(); ... con.WebUserName = mytxtEmail; con.WebPassword = SLXEncryption.Encrypt(mytxtPassword); con.SaveWebAccess(true, mytxtPassword, mytxtVerifyPassword); con.Save();
Then I execute this query:
SQL = "INSERT INTO SLXWebUserInfo (USERID, CREATEDATE, CREATEUSER, USERPREFERENCES) VALUES " + "('"+con.Id.ToString()+"','"+DateTime.Now+"','ADMIN','CONTEXT:webticketcust=y|')";
So apparently I have all the pieces needed for logging into the Customer Portal, but when I try to log in, I get this error message:
The password you have entered is not valid. Please try again or request assistance.
Is my encryption method incorrect? how should I approach this? or how can I fix this?
thanks,
|
|
|
|
Re: encrypting webpassword through a custom page
Posted: 03 Mar 08 6:24 PM
|
the problem was that i was trying to insert a "@" in the webusername field, so i had to do some extra coding just adding in the firstname to the webusername field, then updating that same record to leave the contents of mytxtEmail field in the webusername field, the encrypting of the password also worked after doing this. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|