diff --git a/module/Jobs/src/Jobs/Controller/ManageController.php b/module/Jobs/src/Jobs/Controller/ManageController.php index b800ebc2f..3f6eec5d4 100644 --- a/module/Jobs/src/Jobs/Controller/ManageController.php +++ b/module/Jobs/src/Jobs/Controller/ManageController.php @@ -96,6 +96,10 @@ protected function save($parameter = array()) if (empty($user->info->email)) { return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); } + $userOrg = $user->getOrganization(); + if (!$userOrg->hasAssociation()) { + return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); + } $translator = $serviceLocator->get('translator'); /** @var \Zend\Http\Request $request */ $request = $this->getRequest(); diff --git a/module/Jobs/view/error/no-parent.phtml b/module/Jobs/view/error/no-parent.phtml index e17e75147..da1e28447 100644 --- a/module/Jobs/view/error/no-parent.phtml +++ b/module/Jobs/view/error/no-parent.phtml @@ -17,7 +17,7 @@

cause == 'noEmail') { echo sprintf( - $this->translate('Before you are able to create jobs, you have to %screate an email%s first.'), + $this->translate('Before you are able to create jobs, you have to %screate a valid email%s first.'), '', '' );