Skip to content

current_reader is set to an admin.. even when I use a private browser session #48

@robguthrie

Description

@robguthrie

Hi

I am writing an extension that uses readers, and I call current_reader to detect if the client is logged in as a reader or not.

We are having a big problem, that people visit the site and are being given the admin session.

IE: When I visit the site with a private browser, and the page calls current_reader.. I get given the reader account of an admin user.

Looking into the code i see that current_reader is a method on ReaderPage, which calls Reader.current.

Reader.current is a cattr on the Reader model. This means that the whole system is going to have only one current reader, correct? If so.. isn't that a bug?

If not.. how do I lookup the current reader via authlogic?

Thanks for your time!

UPDATE:

Found out our problems were actually because of this:
http://rdoc.info/github/binarylogic/authlogic#Session_bugs__please_read_if_you_are_having_issues_with_logging_in___out_

Sorry for the run around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions