Advertisement
Guest User

Untitled

a guest
Aug 4th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. login : function(component) {
  2. // username and password passed from component
  3. var usernameValue = component.find("username");
  4. var passwordValue = component.find("password");
  5.  
  6. // invocation of server-side login function
  7. var usernameFound = component.get("c.lightningLogin2");
  8. usernameFound.setParams({
  9. username: usernameValue,
  10. password: passwordValue
  11. });
  12. }
  13.  
  14. @AuraEnabled
  15. public static void lightningLogin2 (String username, String password) {
  16. User u = Plexus_Utility.getUserDetails(username);
  17. if (u != null) {
  18. Site.login(username, password, '/s');
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement