Returns current settings.

        Only accessible if authenticated as the user.
422964
def get_settings(self):
        
        url = self._imgur._base_url + "/3/account/{0}/settings".format(self.name)
        return self._imgur._send_request(url)
622025
def get_user(user=None):
    
    if user is None:
        # Return the current authenticated user
        user = getSecurityManager().getUser()
    elif isinstance(user, MemberData):
        # MemberData wrapped user -> get the user object
        user = user.getUser()
    elif isinstance(user, basestring):
        # User ID -> get the user
        user = get_member_by_login_name(get_portal(), user, False)
        if user:
            user = user.getUser()
    return user
79949
def current(self):
        
        if not has_request_context():
            return self.no_req_ctx_user_stack.top
        user_stack = getattr(_request_ctx_stack.top, 'user_stack', None)
        if user_stack and user_stack.top:
            return user_stack.top
        return _get_user()
786387
def get_user_info(apikey, username, password):
    
    user = authenticate(username, password)
    site = Site.objects.get_current()
    return user_structure(user, site)
955309
def get_preferences(self, user=None):
        
        if user is None:
            user = current_user
        return {pref.key: pref.value for pref in user.preferences}
1194029
def current_user
      if (user_id = session[:user_id])
        @current_user ||= User.find_by(id: user_id)
      elsif (user_id = cookies.signed[:user_id])
        user = User.find_by(id: user_id)
        if user && user.authenticated?(cookies[:remember_token])
          log_in user
          @current_user = user
        end
      end
    end
380942
def get_current_user():
    
    if pwd is None:
        return getpass.getuser()
    else:
        try:
            return pwd.getpwuid(os.getuid())[0]
        except KeyError as error:
            LOGGER.error('Could not get logged-in user: %s', error)
1017506
def get_settings(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_settings(index=self._name, **kwargs)
396471
public static boolean currentUserIsAuthenticated() {
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    return authentication != null && authentication.isAuthenticated() && !currentUserIsAnonymous();
  }
81191
def settings(self):
        
        if not self._settings:
            data = self.query(Settings.key)
            self._settings = Settings(self, data)
        return self._settings
83625
def settings(self):
        """"""
        if not self.__settings:
            self.__settings = self.request('get', 'settings').json()
        return self.__settings
900497
def get_current_user():
    
    process = OpenProcessToken(
        ctypes.windll.kernel32.GetCurrentProcess(), TokenAccess.TOKEN_QUERY
    )
    return GetTokenInformation(process, TOKEN_USER)
957027
def current_settings(self):
        """"""
        settings = {}
        if not self.status_data:
            return settings

        for (key, val) in self.status_data.get('curvals', {}).items():
            try:
                val = float(val)
            except ValueError:
                val = val

            if val in ('on', 'off'):
                val = (val == 'on')

            settings[key] = val

        return settings
973509
def currentuser(self):
        
        request = requests.get(
            '{0}/api/v3/user'.format(self.host),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        return request.json()
718052
public static Authentication getCurrentAuthentication() {
        RequestContext context = RequestContext.getCurrent();
        if (context != null) {
            return getAuthentication(context.getRequest());
        } else {
            return null;
        }
    }
1308769
private static String getCurrentUserName() {
        Authentication a = SecurityContextHolder.getContext().getAuthentication();
        if (a == null) return null;
        org.springframework.security.core.userdetails.User u =
                (org.springframework.security.core.userdetails.User)
                        a.getPrincipal();
        if (u == null) return null;
        return u.getUsername();
    }
86838
def refresh_context(self):
        
        User = self.model('res.user')

        self.context = User.get_preferences(True)
        return self.context