lib/janus/manager.rb
def user(scope)
      scope = scope.to_sym
      @users ||= {}

      if authenticated?(scope)
        if @users[scope].nil?
          begin
          @users[scope] = user_class(scope).find(session(scope)['user_id'])
          rescue ActiveRecord::RecordNotFound
            unset_user(scope)
          else
            Janus::Manager.run_callbacks(:fetch, @users[scope], self, :scope => scope)
          end
        end

        @users[scope]
      end
    end
def user(scope)
      scope = scope.to_sym
      @users ||= {}

      if authenticated?(scope)
        if @users[scope].nil?
          begin
          @users[scope] = user_class(scope).find(session(scope)['user_id'])
          rescue ActiveRecord::RecordNotFound
            unset_user(scope)
          else
            Janus::Manager.run_callbacks(:fetch, @users[scope], self, :scope => scope)
          end
        end

        @users[scope]
      end
    end
Returns the currently connected user.