Precise-Pixels/cell — pull request #97 by jamesl1001 (2014-04-01 00:49:09+00:00)
Title: [READY] Wrong username on user nav

Turns out this wasn't actually much of a security issue as we thought.

When visiting another user's profile, it wasn't actually logging in as that user, it was just displaying the wrong username in the `#user-message` and the wrong links in the user nav. The user wouldn't have been able to do anything like delete another user's environments for instance.

The problem only occurred on the live server and not on the sandbox, probably due to differing PHP versions.

For some reason, on live, session variables can be accessed in two ways:

Let's say we set a session variable called username:
`$_SESSION['username'] = 'james';`

That variable can be accessed like so:
`echo $_SESSION['username'];`
OR
`echo $username;`

Therefore, because I was using the `$username` variable for something else, it was being overridden.

I also can't find anywhere in the PHP documentation saying that PHP session variables can be accessed this way - strange.