Advertisement
Guest User

Untitled

a guest
Aug 11th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. function authenticateUser(){
  2.  
  3. console.log("authenticateUser");
  4. $("#session_msg").html("").hide();
  5.  
  6. var username = $("#username").val();
  7. var password = $("#password").val();
  8.  
  9. // call returns user_id and user_type if its a valid user ... else false ...
  10. //var valid_user = myshaadiUser.authenticateUser(username, password);
  11. var user_uid = true;
  12.  
  13. if(user_uid == false){
  14. $("#session_msg").html("Invalid username and password").show();
  15. console.log("Invalid username and password");
  16. return false;
  17. }else{
  18. console.log("valid username and password");
  19.  
  20. // get user site_uid .. and getUserSiteUId saves it in localstore as well ..
  21. var site_uid = myshaadiSite.getUserSiteUId(user_uid, redirect_to);
  22.  
  23. console.log("a");
  24. //var site_uid = site.getUserSiteId(valid_user);
  25. }
  26. return false;
  27.  
  28. function redirect_to(){
  29. console.log("redirecting");
  30. window.location = "home.html";
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement