def update_user(cls, username, email, password):
        """ Edit user info """
        if cls._check_email_changed(username, email):
            # if we try to set the email to whatever it is already on SeAT, we get a HTTP422 error
            logger.debug("Updating SeAT username %s with email %s and password" % (username, email))
            ret = cls.exec_request('user/{}'.format(username), 'put', email=email)
            logger.debug(ret)
            if not cls._response_ok(ret):
                logger.warn("Failed to update email for username {}".format(username))
        ret = cls.exec_request('user/{}'.format(username), 'put', password=password)
        logger.debug(ret)
        if not cls._response_ok(ret):
            logger.warn("Failed to update password for username {}".format(username))
            return None
        logger.info("Updated SeAT user with username %s" % username)
        return username
Edit user info