logIn() {
    const userHandle = this.state.userHandle
    const password = this.state.password

    if (userHandle.length && password.length) {
      const phone = normalizePhone(userHandle)

      let query = {"phone": phone}
      if (!phone) {
        query = {"email": userHandle}
      }

      query.password = password

      this.props.getUser(query)
      const user = this.props.user

      if (user) {
        this.finalizeLogin(user, password)
      }
    } else {
      AlertIOS.alert("Missing email, phone number and/or password.")
    }
  }
/**
   * Authenticates a user who has filled in their phone or email and password.
   *
   * @return {void}
   */
Authenticates a user who has filled in their phone or email and password.
@return {void}
Authenticates a user who has filled in their phone or email and password . @return { void }
logIn() {
    const userHandle = this.state.userHandle
    const password = this.state.password
    if (userHandle.length && password.length) {
      const phone = normalizePhone(userHandle)
      let query = {"phone": phone}
      if (!phone) {
        query = {"email": userHandle}
      }
      query.password = password
      this.props.getUser(query)
      const user = this.props.user
      if (user) {
        this.finalizeLogin(user, password)
      }
    } else {
      AlertIOS.alert("Missing email, phone number and/or password.")
    }
  }
logIn ( ) { const userHandle = this . state . userHandle const password = this . state . password if ( userHandle . length && password . length ) { const phone = normalizePhone ( userHandle ) let query = { "phone" : phone } if ( ! phone ) { query = { "email" : userHandle } } query . password = password this . props . getUser ( query ) const user = this . props . user if ( user ) { this . finalizeLogin ( user , password ) } } else { AlertIOS . alert ( "Missing email, phone number and/or password." ) } }
Authenticates a user who has filled in their phone or email and password.
Authenticates a user who has filled in their phone or email and password .