SHARE
TWEET

Untitled

a guest Dec 13th, 2016 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function registerAjax(e) {
  2. e.preventDefault();
  3. let userData = {
  4.     username: $("#username").val(),
  5.     password: $("#password").val(),
  6. };
  7. $.ajax({
  8.     method: "POST",
  9.     url: kinveyBaseUrl + "user/" + kinveyAppKey + "/",
  10.     headers: kinveyAppAuthHeaders,
  11.     data: userData,
  12.     success: registerSuccess,
  13.     error: handleAjaxError
  14. });
  15. function registerSuccess(userInfo) {
  16.     saveAuthInSession(userInfo);
  17.     showInfo('User registration successful.');
  18. }
  19.    
  20. function registerUser() {
  21. registerAjax();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top