Fetches the MAL user recommendations page and sets the current user's recommendations attributes.

    :rtype: :class:`.User`
    :return: Current user object.
541536
def load_recommendations(self):
    
    user_recommendations = self.session.session.get(u'http://myanimelist.net/profile/' + utilities.urlencode(self.username) + u'/recommendations').text
    self.set(self.parse_recommendations(utilities.get_clean_dom(user_recommendations)))
    return self
158157
def get_redditor(self, user_name, *args, **kwargs):
        
        return objects.Redditor(self, user_name, *args, **kwargs)
1086942
def get_user(self, key = None):
		'''
		''' 	
		if key:
			uri = self.api_uri + "/users/" + key
		else:
			uri = self.api_uri + "/users/me"

		return self._req('get', uri)
817580
def safe_get_user_model():
    
    user_app, user_model = settings.AUTH_USER_MODEL.split('.')
    return apps.get_registered_model(user_app, user_model)
167533
def get_user(self, username):
        
        User = get_user_model()  # noqa
        try:
            user = User.objects.get(**{
                User.USERNAME_FIELD: username,
                'is_active': False
            })
            return user
        except User.DoesNotExist:
            return None
878098
def user(self, user: str) -> "ChildHTTPAPI":
        
        if self.is_real_user:
            raise ValueError("Can't get child of real user")

        try:
            return self.children[user]
        except KeyError:
            child = ChildHTTPAPI(user, self)
            self.children[user] = child
            return child
98371
def get_me(self):
        
        response = self.request_json(self.config['me'])
        user = objects.Redditor(self, response['name'], response)
        user.__class__ = objects.LoggedInRedditor
        return user
837155
def get_user_paginator(
        cls,
        instance,
        page=1,
        item_count=None,
        items_per_page=50,
        user_ids=None,
        GET_params=None,
    ):
        
        if not GET_params:
            GET_params = {}
        GET_params.pop("page", None)
        query = instance.users_dynamic
        if user_ids:
            query = query.filter(cls.models_proxy.UserGroup.user_id.in_(user_ids))
        return SqlalchemyOrmPage(
            query,
            page=page,
            item_count=item_count,
            items_per_page=items_per_page,
            **GET_params
        )
1174658
def parse_recommendations(self, recommendations_page):
    
    user_info = self.parse_sidebar(recommendations_page)
    second_col = recommendations_page.find(u'div', {u'id': u'content'}).find(u'table').find(u'tr').find_all(u'td', recursive=False)[1]

    try:
      recommendations = second_col.find_all(u"div", {u"class": u"spaceit borderClass"})
      if recommendations:
        user_info[u'recommendations'] = {}
        for row in recommendations[1:]:
          anime_table = row.find(u'table')
          animes = anime_table.find_all(u'td')
          liked_media_link = animes[0].find(u'a', recursive=False)
          link_parts = liked_media_link.get(u'href').split(u'/')
          # of the form /anime|manga/64/Rozen_Maiden
          liked_media = getattr(self.session, link_parts[1])(int(link_parts[2])).set({u'title': liked_media_link.text})

          recommended_media_link = animes[1].find(u'a', recursive=False)
          link_parts = recommended_media_link.get(u'href').split(u'/')
          # of the form /anime|manga/64/Rozen_Maiden
          recommended_media = getattr(self.session, link_parts[1])(int(link_parts[2])).set({u'title': recommended_media_link.text})

          recommendation_text = row.find(u'p').text

          recommendation_menu = row.find(u'div', recursive=False)
          utilities.extract_tags(recommendation_menu)
          recommendation_date = utilities.parse_profile_date(recommendation_menu.text.split(u' - ')[1])

          user_info[u'recommendations'][liked_media] = {link_parts[1]: recommended_media, 'text': recommendation_text, 'date': recommendation_date}
    except:
      if not self.session.suppress_parse_exceptions:
        raise

    return user_info
96209
def request_get_user(self, user_ids) -> dict:
        
        method_params = {'user_ids': user_ids}
        response = self.session.send_method_request('users.get', method_params)
        self.check_for_errors('users.get', method_params, response)
        return response
717820
def get_likes(self):
        
        from .users import User
        return self._session.fetch_items('likes.getList', User._get_user, count=100, type='post', owner_id=self.from_id, item_id=self.id)
699257
def get_queryset(self):
        
        # Determines the forums that can be accessed by the current user
        forums = self.request.forum_permission_handler.get_readable_forums(
            Forum.objects.all(), self.request.user,
        )

        # Returns the posts submitted by the considered user.
        return (
            Post.objects
            .select_related('topic', 'topic__forum', 'poster')
            .prefetch_related('poster__forum_profile')
            .filter(poster=self.poster, topic__forum__in=forums)
            .order_by('-created')
        )
607510
def user(self, user):
        """"""

        resource = self.RUSER + '/' + user
        params = {}

        result = [page for page in self._fetch(resource, params)]

        return result[0]
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()
351949
def fetch_user(query):
    """"""
    user_filter = {'pk': query} if query.isdigit() else {'username': query}
    user_model = get_user_model()

    try:
        return user_model.objects.get(**user_filter)
    except user_model.DoesNotExist:
        raise exceptions.ParseError("Unknown user: {}".format(query))
86838
def refresh_context(self):
        
        User = self.model('res.user')

        self.context = User.get_preferences(True)
        return self.context
601932
def get(self, user_name: str) -> User:
        
        user = current_user()
        if user.is_admin or user.name == user_name:
            return self._get_or_abort(user_name)
        else:
            abort(403)