my-koop / module.user

User module for My Koop responsible for user profiles
GNU General Public License v2.0
0 stars 0 forks source link

Check if email exists #40

Closed Cellule closed 9 years ago

Cellule commented 9 years ago

example:

          function() {
            actions.user.emailExists(
            {
              silent: true,
              data: {
                email: newValue.value
              }
            }, function(err, result) {
              // treat this response only if its the last we made
              if(curReqId === self.state.email.reqId) {
                var newState = err || !result ? "invalid" : "valid";
                newValue.state = newState;
                self.setState({
                  email: newValue
                });
              }
            });
mathieumg commented 9 years ago

CR done, good to merge. I imagine the component that uses this will be part of a future PR?

Cellule commented 9 years ago

it is in another module (Transaction), but I believe others will want to use this as well