Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login : function(component) {
- // username and password passed from component
- var usernameValue = component.find("username");
- var passwordValue = component.find("password");
- // invocation of server-side login function
- var usernameFound = component.get("c.lightningLogin2");
- usernameFound.setParams({
- username: usernameValue,
- password: passwordValue
- });
- }
- @AuraEnabled
- public static void lightningLogin2 (String username, String password) {
- User u = Plexus_Utility.getUserDetails(username);
- if (u != null) {
- Site.login(username, password, '/s');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement