-
-
Save RyanABailey/0bd0e81fd421bde8bf38 to your computer and use it in GitHub Desktop.
Sitecore User Login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static string Domain = "extranet"; | |
| public static bool Login(string email, string password) | |
| { | |
| var username = string.Format(@"{0}\{1}", Domain, email); | |
| try | |
| { | |
| if (Sitecore.Security.Authentication.AuthenticationManager.Login(username, password)) | |
| { | |
| return true; | |
| } | |
| } | |
| catch (System.Security.Authentication.AuthenticationException exception) | |
| { | |
| // log error | |
| } | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment