Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong user account displayed on front page #86

Open
mhdingler opened this issue Oct 28, 2011 · 1 comment
Open

Wrong user account displayed on front page #86

mhdingler opened this issue Oct 28, 2011 · 1 comment

Comments

@mhdingler
Copy link

Just went to the lamernews front page and the wrong user profile was shown in the right hand corner.

Screenshot: http://i.imgur.com/s5R9R.png

My user name: mhd
Wrong user: deivinsontejeda

Back to normal on reload. Couldn't reproduce error after that.

System: Firefox 7.0.1 (OS X 10.7.2) w/ AdBlock and Ghostery add-ons

@antirez
Copy link
Owner

antirez commented Oct 28, 2011

Probably due to the fact that I use a global for $user ?

Apparently in Sinatra globals are shared among the whole environment, will switch to Sinatra properties soon to fix that.
Thanks for reporting.

EDIT: I don't think properties are a good fix either. The current user should probably be instead set into an instance variable, even if this poses problems accessing it from the HTMLGen object H... I'm trying to understand better how scoping works in Sinatra but there is not much documentation about things like how concurrency is handled, scope of different kind of variables/methods and so forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants