onSignUp() {
    const form = this.refs.form.getValue()

    if (form.email) {
      this.props.getUser({email: form.email})

      this.setState({
        isEmailVerified: false
      })
    }

    if (form.phone) {
      this.props.getUser({phone: form.phone})

      this.setState({
        isPhoneVerified: false
      })
    }

    if (!this.props.user || !this.props.user.length) {
      this.props.signUpUser(form)

      if (this.props.isSignedUp) {
        this.props.verifyUserModal.toggleVisbility()
      } else {
        AlertIOS.alert("Failed to sign up.")
      }
    } else {
      AlertIOS.alert("Username, email, or phone taken.")
    }
  }
/**
   * Handles the user ValidationUtilsand sign-up process.
   *
   * @return {object}
   */
Handles the user ValidationUtilsand sign-up process.
@return {object}
Handles the user ValidationUtilsand sign - up process . @return { object }
onSignUp() {
    const form = this.refs.form.getValue()
    if (form.email) {
      this.props.getUser({email: form.email})
      this.setState({
        isEmailVerified: false
      })
    }
    if (form.phone) {
      this.props.getUser({phone: form.phone})
      this.setState({
        isPhoneVerified: false
      })
    }
    if (!this.props.user || !this.props.user.length) {
      this.props.signUpUser(form)
      if (this.props.isSignedUp) {
        this.props.verifyUserModal.toggleVisbility()
      } else {
        AlertIOS.alert("Failed to sign up.")
      }
    } else {
      AlertIOS.alert("Username, email, or phone taken.")
    }
  }
onSignUp ( ) { const form = this . refs . form . getValue ( ) if ( form . email ) { this . props . getUser ( { email : form . email } ) this . setState ( { isEmailVerified : false } ) } if ( form . phone ) { this . props . getUser ( { phone : form . phone } ) this . setState ( { isPhoneVerified : false } ) } if ( ! this . props . user || ! this . props . user . length ) { this . props . signUpUser ( form ) if ( this . props . isSignedUp ) { this . props . verifyUserModal . toggleVisbility ( ) } else { AlertIOS . alert ( "Failed to sign up." ) } } else { AlertIOS . alert ( "Username, email, or phone taken." ) } }
Handles the user ValidationUtilsand sign-up process.
Handles the user ValidationUtilsand sign - up process .