void Start() { if (instance == null) { instance = this; } }
void OnReceivedSPLoginResponse(SPLogin.SPLogin_Responce response) { if (response.code == 0) IntegrationTest.Pass(gameObject); else IntegrationTest.Fail(gameObject); }
public void ResendVerificationEmail() { string ErrorMsg = ""; if (!loginUserEmailValidator.IsValidCheck()) { ErrorMsg = "Validation resend requires valid E-mail"; } loginErrorLabel.text = ErrorMsg; if (string.IsNullOrEmpty(ErrorMsg)) { SwitchToConfirmation(); confirmationButton.onClick.Clear(); confirmationButton.onClick.Add(new EventDelegate(this, "SwitchToLogin")); confirmationButton.GetComponentInChildren <UILabel>().text = "Back"; SPLogin.ResendVerificationEmail(loginUserEmail.value); } }
public void Register() { string ErrorMsg = ""; if (!registerUserNameValidator.IsValidCheck()) { if (!string.IsNullOrEmpty(ErrorMsg)) { ErrorMsg += "\n"; } ErrorMsg += "-Invalid User Name"; } if (!registerUserEmailValidator.IsValidCheck()) { if (!string.IsNullOrEmpty(ErrorMsg)) { ErrorMsg += "\n"; } ErrorMsg += "-Invalid Email"; } if (!registerUserPasswordValidator.IsValidCheck() || !registerUserPasswordConfirmValidator.IsValidCheck()) { if (!string.IsNullOrEmpty(ErrorMsg)) { ErrorMsg += "\n"; } ErrorMsg += "-Invalid Password"; } registerErrorLabel.text = ErrorMsg; if (string.IsNullOrEmpty(ErrorMsg)) { SwitchToConfirmation(); SPLogin.RegisterUser(registerUserEmail.value, registerUserPassword.value, registerUserName.value); } }
public void Login() { string ErrorMsg = ""; if (!loginUserEmailValidator.IsValidCheck()) { ErrorMsg = "-Invalid Email"; } if (!loginUserPasswordValidator.IsValidCheck()) { if (!string.IsNullOrEmpty(ErrorMsg)) { ErrorMsg += "\n"; } ErrorMsg += "-Invalid Password"; } loginErrorLabel.text = ErrorMsg; if (string.IsNullOrEmpty(ErrorMsg)) { PlayerPrefs.SetString("SocialPlay_Login_UserEmail", loginUserEmail.value); SPLogin.Login(loginUserEmail.value.ToLower(), loginUserPassword.value); } }
void OnReceivedLoginResponse(SPLogin.SPLogin_Responce response) { Debug.Log("Login Response: " + response.code + " UserInfo: " + response.userInfo.name); }
void RecivedUserGuid(SPLogin.UserInfo obj) { if (autoLoginToggle != null && autoLoginToggle.value == true) { PlayerPrefs.SetString("SocialPlay_UserGuid", obj.ID.ToString()); PlayerPrefs.SetString("SocialPlay_UserName", obj.name); PlayerPrefs.SetString("SocialPlay_UserEmail", obj.email); } resendVerificationTextObject.SetActive(false); loginErrorLabel.text = "User logged in"; this.gameObject.SetActive(false); ContainerKeybinding.EnableKeybinding("Login"); }
void RegisterMessageResponce(SPLogin.SPLogin_Responce responce) { resendVerificationTextObject.SetActive(false); if (responce.code == 0) { confirmationStatus.text = "Verification Email has been sent to your Email"; confirmationButton.onClick.Clear(); confirmationButton.onClick.Add(new EventDelegate(this, "SwitchToLogin")); confirmationButton.GetComponentInChildren<UILabel>().text = "To Login"; } else { confirmationStatus.text = responce.message; confirmationButton.onClick.Clear(); confirmationButton.onClick.Add(new EventDelegate(this, "SwitchToRegister")); confirmationButton.GetComponentInChildren<UILabel>().text = "Back"; } }
void RecivedLoginResponce(SPLogin.SPLogin_Responce recivedMessage) { if (recivedMessage.code == 3) { resendVerificationTextObject.SetActive(true); return; } resendVerificationTextObject.SetActive(false); loginErrorLabel.text = recivedMessage.message; }
void ForgotPasswordResponce(SPLogin.SPLogin_Responce responce) { //resendVerificationTextObject.SetActive(false); //loginErrorLabel.text = responce.message; confirmationStatus.text = responce.message; }
void ResentVerificationResponce(SPLogin.SPLogin_Responce responce) { resendVerificationTextObject.SetActive(false); loginErrorLabel.text = responce.message; }