parent
1d55ae11b2
commit
a92585fcb8
8 changed files with 29 additions and 26 deletions
|
|
@ -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.');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue