do not access user data if user is not logged-in in SeminaryRoleController
This commit is contained in:
parent
fdf20b3378
commit
e630c6a5c4
1 changed files with 5 additions and 2 deletions
|
|
@ -80,8 +80,11 @@
|
|||
// Get Seminary and Character data
|
||||
try {
|
||||
self::$seminary = $this->Seminaries->getSeminaryByUrl($this->request->getParam(3));
|
||||
self::$user['seminaryroles'] = array_map(function($r) { return $r['name']; }, $this->Userseminaryroles->getUserseminaryrolesForUserById(self::$user['id'], self::$seminary['id']));
|
||||
self::$character = $this->Characters->getCharacterForUserAndSeminary(self::$user['id'], self::$seminary['id']);
|
||||
if(!is_null(self::$user))
|
||||
{
|
||||
self::$user['seminaryroles'] = array_map(function($r) { return $r['name']; }, $this->Userseminaryroles->getUserseminaryrolesForUserById(self::$user['id'], self::$seminary['id']));
|
||||
self::$character = $this->Characters->getCharacterForUserAndSeminary(self::$user['id'], self::$seminary['id']);
|
||||
}
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue