Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool LoginToSLX(string username)
- {
- try
- {
- var portalUser = Sage.SalesLogix.Security.PortalUser.GetPortalUser(username);
- var auditParams = new Auditing.AuditParams
- {
- AuditEvent = Auditing.AuditEvent.Login,
- ContactId = portalUser.Contact.Id.ToString(),
- UserName = username
- };
- new ContactAuditing().AddEvent(auditParams);
- FormsAuthentication.SetAuthCookie(username, true);
- return true;
- }
- catch (Exception ex)
- {
- Response.Write(ex.Message);
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement