Fix login link race condition #960

Merged
merged 1 commit into from Feb 16, 2016

Conversation

Projects
None yet
2 participants
@mfairchild365
Member

mfairchild365 commented Feb 12, 2016

It looks like there was a race condition. Website can set the login URL with JS, which will also cause displayLogin() to be called. displayLogin() would remove the .loggedin class from IDM container (but not remove the profile image, etc). This would cause weird styling.

If a user is already logged in, the displayLogin() method should never be called, so prevent it from doing anything.

Fix login link race condition
It looks like there was a race condition. Website can set the login URL with JS, which will also cause `displayLogin()` to be called. `displayLogin()` would remove the ``.loggedin` class from IDM container (but not remove the profile image, etc).  This would cause weird styling.

If a user is already logged in, the `displayLogin()` method should never be called, so prevent it from doing anything.

kabel added a commit that referenced this pull request Feb 16, 2016

@kabel kabel merged commit 0442c69 into unl:develop Feb 16, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mfairchild365 mfairchild365 deleted the mfairchild365:fix-login-link branch May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment