Updating session variables to add phpci_ prefix.

Fixes #652
This commit is contained in:
Dan Cryer 2014-12-01 15:56:33 +00:00
commit a92585fcb8
8 changed files with 29 additions and 26 deletions

View file

@ -56,7 +56,7 @@ class UserController extends Controller
public function profile()
{
$user = $_SESSION['user'];
$user = $_SESSION['phpci_user'];
$values = $user->getDataArray();
if ($this->request->getMethod() == 'POST') {
@ -64,7 +64,7 @@ class UserController extends Controller
$email = $this->getParam('email', null);
$password = $this->getParam('password', null);
$_SESSION['user'] = $this->userService->updateUser($user, $name, $email, $password);
$_SESSION['phpci_user'] = $this->userService->updateUser($user, $name, $email, $password);
}
$form = new Form();
@ -109,7 +109,7 @@ class UserController extends Controller
*/
public function add()
{
if (!$_SESSION['user']->getIsAdmin()) {
if (!$_SESSION['phpci_user']->getIsAdmin()) {
throw new ForbiddenException('You do not have permission to do that.');
}
@ -151,7 +151,7 @@ class UserController extends Controller
*/
public function edit($userId)
{
if (!$_SESSION['user']->getIsAdmin()) {
if (!$_SESSION['phpci_user']->getIsAdmin()) {
throw new ForbiddenException('You do not have permission to do that.');
}
@ -244,7 +244,7 @@ class UserController extends Controller
*/
public function delete($userId)
{
if (!$_SESSION['user']->getIsAdmin()) {
if (!$_SESSION['phpci_user']->getIsAdmin()) {
throw new ForbiddenException('You do not have permission to do that.');
}