Get registerUserInfo

        Args:
            svctype: Platform information
            auth: ???

        Returns:
            True: Success
            False: Failed
321374
def getRegisterUserInfo(self, svctype = "Android NDrive App ver", auth = 0):
        
        data = {'userid': self.user_id, 'svctype': svctype, 'auth': auth}
        r = self.session.get(nurls['getRegisterUserInfo'], params = data)

        j = json.loads(r.text)

        if j['message'] != 'success':
            print "[*] Error getRegisterUserInfo: " + j['message']
            return False

        else:
            self.useridx = j['resultvalue']['useridx']
            return True
1291732
def _get_userprofile_from_registry(user, sid):
    '''
    
    '''
    profile_dir = __utils__['reg.read_value'](
        'HKEY_LOCAL_MACHINE',
        'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
        'ProfileImagePath'
    )['vdata']
    log.debug(
        'user %s with sid=%s profile is located at "%s"',
        user, sid, profile_dir
    )
    return profile_dir
392523
def GET(self):
        
        if self.user_manager.session_logged_in() or not self.app.allow_registration:
            raise web.notfound()

        error = False
        reset = None
        msg = ""
        data = web.input()

        if "activate" in data:
            msg, error = self.activate_user(data)
        elif "reset" in data:
            msg, error, reset = self.get_reset_data(data)

        return self.template_helper.get_renderer().register(reset, msg, error)
491126
def _request_auth(self, registry):
        
        if registry:
            if registry.auth:
                registry.auth.load_dockercfg()

            try:
                self._client_session.login(username=registry.auth.user,
                                           password=registry.auth.passwd,
                                           dockercfg_path=registry.auth.config_path,
                                           reauth=True if registry.auth.auth_type == 'registry_rubber' else False,
                                           registry=registry.auth.registry)
            except Exception:
                raise
        else:
            raise Exception("a registry is required when requesting auth.")
71276
def API_GET(self):  # pylint: disable=arguments-differ
        
        if self.user_manager.session_logged_in():
            return 200, {"authenticated": True, "username": self.user_manager.session_username()}
        else:
            return 200, {"authenticated": False}
684543
def get_authc_info(self, identifier, session=None):
        
        user = self._get_user_query(session, identifier).first()

        creds = self._get_credential_query(session, identifier).all()
        if not creds:
            return None
        authc_info = {cred_type: {'credential': cred_value, 'failed_attempts': []}
                      for cred_type, cred_value in creds}

        if 'totp_key' in authc_info:
            authc_info['totp_key']['2fa_info'] = {'phone_number': user.phone_number}

        return dict(account_locked=user.account_lock_millis, authc_info=authc_info)
562468
def _verify_auth(self):
        '''
        
        '''

        return self.token and bool(self.application.auth.get_tok(self.token))
916241
def user_info(self, verbose=False):
        '''
        
        '''
        url = '{}/{}'.format(self.rest_url, 'user')
        return self.__auth_req_get(url, verbose=verbose)
28308
def get_user_info(self):
        
        response = self.get_proto(path='/user')
        message = yamcsManagement_pb2.UserInfo()
        message.ParseFromString(response.content)
        return UserInfo(message)
1073694
def register(request):
    '''
    
    '''
    serializer_class = registration_settings.REGISTER_SERIALIZER_CLASS
    serializer = serializer_class(data=request.data)
    serializer.is_valid(raise_exception=True)

    kwargs = {}

    if registration_settings.REGISTER_VERIFICATION_ENABLED:
        verification_flag_field = get_user_setting('VERIFICATION_FLAG_FIELD')
        kwargs[verification_flag_field] = False
        email_field = get_user_setting('EMAIL_FIELD')
        if (email_field not in serializer.validated_data
                or not serializer.validated_data[email_field]):
            raise BadRequest("User without email cannot be verified")

    user = serializer.save(**kwargs)

    output_serializer_class = registration_settings.REGISTER_OUTPUT_SERIALIZER_CLASS  # noqa: E501
    output_serializer = output_serializer_class(instance=user)
    user_data = output_serializer.data

    if registration_settings.REGISTER_VERIFICATION_ENABLED:
        signer = RegisterSigner({
            'user_id': user.pk,
        }, request=request)
        template_config = (
            registration_settings.REGISTER_VERIFICATION_EMAIL_TEMPLATES)
        send_verification_notification(user, signer, template_config)

    return Response(user_data, status=status.HTTP_201_CREATED)
721808
def get_user_info(self, user_id, **kwargs):
        
        return GetUserInfo(settings=self.settings, **kwargs).call(
            user_id=user_id,
            **kwargs
        )
720857
def infos(self, type=None, failed=False):
        
        if type is None:
            type = Info

        if not issubclass(type, Info):
            raise TypeError(
                "Cannot get infos of type {} " "as it is not a valid type.".format(type)
            )

        if failed not in ["all", False, True]:
            raise ValueError("{} is not a valid vector failed".format(failed))

        if failed == "all":
            return type.query.filter_by(origin_id=self.id).all()
        else:
            return type.query.filter_by(origin_id=self.id, failed=failed).all()
733342
def get_activation_key(self, user):
        
        return signing.dumps(
            obj=user.get_username(),
            salt=REGISTRATION_SALT
        )
472141
def register(self, user_dict):
        
        endpoint = os.path.join(self._config.get('napps', 'api'), 'users', '')
        res = self.make_request(endpoint, method='POST', json=user_dict)

        return res.content.decode('utf-8')
117842
def getUserInfo(self):
        
        userJson = self.httpGet(ReaderUrl.USER_INFO_URL)
        result = json.loads(userJson, strict=False)
        self.userId = result['userId']
        return result
825557
function getUserProfile(callback) {
    if (_.isUndefined(callback)) {
    } else {
      var u = baseUrl + "/me";
      var tokenData = this.getAuthToken();
      if (tokenData.type != "bearer") {
        throw new Error("Invalid token type. Must use a token of type bearer.");
      }
      return helper.get(tokenData, u, callback);
    }
  }
1326188
async def getAuthInfo(self, name):
        '''
        
        '''
        item = self._getAuthItem(name)
        pack = item.pack()

        # translate role guids to names for back compat
        if pack.get('type') == 'user':
            pack['roles'] = [self.cell.auth.role(r).name for r in pack['roles']]

        return (name, pack)