Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function authenticateUser(){
- console.log("authenticateUser");
- $("#session_msg").html("").hide();
- var username = $("#username").val();
- var password = $("#password").val();
- // call returns user_id and user_type if its a valid user ... else false ...
- //var valid_user = myshaadiUser.authenticateUser(username, password);
- var user_uid = true;
- if(user_uid == false){
- $("#session_msg").html("Invalid username and password").show();
- console.log("Invalid username and password");
- return false;
- }else{
- console.log("valid username and password");
- // get user site_uid .. and getUserSiteUId saves it in localstore as well ..
- var site_uid = myshaadiSite.getUserSiteUId(user_uid, redirect_to);
- console.log("a");
- //var site_uid = site.getUserSiteId(valid_user);
- }
- return false;
- function redirect_to(){
- console.log("redirecting");
- window.location = "home.html";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement