do not let Characters change their type (only moderators are allowed to do that)

This commit is contained in:
coderkun 2014-05-02 01:35:52 +02:00
commit fa7b9b552b
2 changed files with 8 additions and 1 deletions

View file

@ -491,7 +491,7 @@
$typeIndex = null;
foreach($types as $index => &$type)
{
$type['selected'] = ($type['url'] == $this->request->getPostParam('type'));
$type['selected'] = (count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) ? ($type['url'] == $this->request->getPostParam('type')) : ($type['url'] == $character['charactertype_url']);
if($type['selected']) {
$typeIndex = $index;
}