:rtype: UserStorageHandler
427167
def get_instance(cls, state):
        """"""
        if cls.instance is None:
            cls.instance = UserStorageHandler(state)
        return cls.instance
848354
def do_execute(self):
        
        if self.storagehandler is None:
            return "No storage handler available!"
        sname = str(self.resolve_option("storage_name"))
        if sname not in self.storagehandler.storage:
            return "No storage item called '" + sname + "' present!"
        self._output.append(Token(self.storagehandler.storage[sname]))
        return None
668219
def store_user_data(user=None, group=None,data_kind=DINGOS_USER_DATA_TYPE_NAME,user_data=None,iobject_name=None):
        

        if not user_data:
            user_data = {}

        if not user.is_authenticated():
            user = None

        user_config,created =  UserData.objects.get_or_create(user=user,group=group,data_kind=data_kind)
        return user_config.store(user_data,iobject_type_name=data_kind,iobject_name=iobject_name)
255652
def user_post_save_handler(**kwargs):
    """"""
    if kwargs.get('created'):
        total = get_user_model().objects.all().count()
        data = [{
            'measurement': 'django_auth_user_create',
            'tags': {'host': settings.INFLUXDB_TAGS_HOST, },
            'fields': {'value': 1, },
            'time': timezone.now().isoformat(),
        }]
        write_points(data)

        data = [{
            'measurement': 'django_auth_user_count',
            'tags': {'host': settings.INFLUXDB_TAGS_HOST, },
            'fields': {'value': total, },
            'time': timezone.now().isoformat(),
        }]
        write_points(data)
508096
def handle(self, *args, **options):
        

        def get_user(username):
            try:
                return User.objects.get(username=username)
            except ObjectDoesNotExist as e:
                raise CommandError("This user doesn't exist in the database")

        def add_permissions(user_field_permissions, content_type, name):

            p = None
            try:
                p = FieldPermission.objects.get(content_type=content_type, name=name)
            except ObjectDoesNotExist:
                p = FieldPermission(content_type=content_type, name=name)
                p.save()
            finally:
                user_field_permissions.permissions.add(p)



        if len(args) !=1:
             raise CommandError("Specifies a json file created by the fine_permissions_dump command")
        else:
            try:


                with open(args[0], 'r') as json_file:
                    myjson = json.load(json_file)

                    user = get_user(options.get('user')) if options['user'] else get_user(myjson['username'])
                    fields_permissions = myjson['fields_permissions']

                    user_field_permissions = UserFieldPermissions(user=user)
                    user_field_permissions.save()

                    for f in fields_permissions:
                        content_type = ContentType.objects.get(app_label=f["app_label"], model=f["model"])
                        add_permissions(user_field_permissions, content_type, f['name'])


            except Exception as e:
                raise CommandError(e)
298181
def dump(self):
        

        walker = self.dump_walker
        if walker is not None:
            walker = walker.dump()

        state = {
            'storage': self.storage.dump(),
            'dump_walker': walker,
            'next_id': self.next_id
        }

        return state
72646
def fieldstorage(self):
        
        if self._fieldstorage is None:
            if self._body is not None:
                raise ReadBodyTwiceError()

            self._fieldstorage = cgi.FieldStorage(
                environ=self._environ,
                fp=self._environ['wsgi.input']
            )

        return self._fieldstorage
714353
function getUserData() {
   let userData = localStorage.getItem(LOCAL_STORAGE_ID);
   if (userData === null) {
      userData = '{}';
   }

   userData = JSON.parse(userData);
   return userData;
}
966104
def handler(self):
        """"""
        if self._handler is None:
            passman = request.HTTPPasswordMgrWithDefaultRealm()
            passman.add_password(None,
                                 self._parsed_org_url,
                                 self._login_username,
                                 self.password)
            self._handler = request.HTTPBasicAuthHandler(passman)
        return self._handler
564796
def users(self):
        
        return Users(url="%s/users" % self.root,
                     securityHandler=self._securityHandler,
                     proxy_url=self._proxy_url,
                     proxy_port=self._proxy_port)
508855
def users(self):
        
        if self._user_manager is None:
            self._user_manager = UserManager(session=self._session)
        return self._user_manager
813674
def user_save_event(user):
    
    msg = 'User ({}){} updated/saved'.format(user.id, user.email)
    current_app.logger.info(msg)
41776
def usage(self):
        ''''''
        retval, stderr, stdout = _pysam_dispatch(
            self.collection,
            self.dispatch,
            is_usage=True,
            catch_stdout=True)
        # some tools write usage to stderr, such as mpileup
        if stderr:
            return stderr
        else:
            return stdout
1313119
def perform_permissions_check(self, user, obj, perms):
        
        return self.request.forum_permission_handler.can_download_files(obj, user)
586580
function() {
      if (Parse.User._currentUser !== null) {
        Parse.User._currentUser._logOutWithAll();
        Parse.User._currentUser._isCurrentUser = false;
      }
      Parse.User._currentUserMatchesDisk = true;
      Parse.User._currentUser = null;
      Parse.localStorage.removeItem(
          Parse._getParsePath(Parse.User._CURRENT_USER_KEY));
    }
1070596
def _transport_ready_handler(self, fd, cb_condition):
        
        if(self.user_cb):
            self.user_cb(self.user_arg)
        return True
718278
def do_execute(self):
        
        if self.storagehandler is None:
            return "No storage handler available!"
        expr = str(self.resolve_option("expression")).replace(
            "{X}", str(self.storagehandler.storage[str(self.resolve_option("storage_name"))]))
        expr = self.storagehandler.expand(expr)
        self.storagehandler.storage[self.resolve_option("storage_name")] = eval(expr)
        self._output.append(self.input)
        return None