Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <LoginBar AuthRes={this.state.AuthResults} IsLoggedIn={this.state.isLoggedIn}/>
  2.  
  3. LoginAuth = (Res) => {
  4. if (Res.username === this.state.Username && Res.password === this.state.Password) {
  5. this.setState({
  6. IsLoggedIn: true,
  7. }, function(){
  8.  
  9. });
  10. this.hideModal();
  11.  
  12. } else {
  13. console.log("Gets to login auth and false");
  14. }
  15. }
  16. CheckLoginAuth() {
  17. console.log("gets to check login auth");
  18. console.log(this.state.AuthRes);
  19. console.log("Username=" + this.state.Username);
  20. console.log("Password=" + this.state.Password);
  21. var self = this;
  22. this.props.AuthRes.map(function (Res) {
  23. console.log("ID=" + Res.id);
  24. console.log("Username=" + Res.username);
  25. console.log("Password=" + Res.password);
  26. self.LoginAuth(Res);
  27. });
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement