code: 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()
docs: Returns the current user