do not access user data if user is not logged-in in SeminaryRoleController
This commit is contained in:
parent
5e02062c26
commit
fdf1e6e9bd
1 changed files with 5 additions and 2 deletions
|
|
@ -80,9 +80,12 @@
|
||||||
// Get Seminary and Character data
|
// Get Seminary and Character data
|
||||||
try {
|
try {
|
||||||
self::$seminary = $this->Seminaries->getSeminaryByUrl($this->request->getParam(3));
|
self::$seminary = $this->Seminaries->getSeminaryByUrl($this->request->getParam(3));
|
||||||
|
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::$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']);
|
self::$character = $this->Characters->getCharacterForUserAndSeminary(self::$user['id'], self::$seminary['id']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue