@@ -124,7 +124,7 @@ |
||
| 124 | 124 | return $result; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - public function canCreate($member = null){ |
|
| 127 | + public function canCreate($member = null) { |
|
| 128 | 128 | return Permission::check('ACCESS_USER_INVITATIONS'); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function providePermissions() |
| 17 | 17 | { |
| 18 | - return array( |
|
| 18 | + return array( |
|
| 19 | 19 | 'ACCESS_USER_INVITATIONS' => array( |
| 20 | 20 | 'name' => _t('UserController.ACCESS_PERMISSIONS', 'Allow user invitations'), |
| 21 | 21 | 'category' => _t('UserController.CMS_ACCESS_CATEGORY', 'User Invitations') |
@@ -31,7 +31,9 @@ |
||
| 31 | 31 | } else if (!Permission::check('ACCESS_USER_INVITATIONS')){ |
| 32 | 32 | return Security::permissionFailure(); |
| 33 | 33 | |
| 34 | - } else return $this->renderWith(array('UserController', 'Page')); |
|
| 34 | + } else { |
|
| 35 | + return $this->renderWith(array('UserController', 'Page')); |
|
| 36 | + } |
|
| 35 | 37 | } |
| 36 | 38 | |
| 37 | 39 | public function InvitationForm() |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | if (!Member::currentUserID()) { |
| 30 | 30 | return $this->redirect('/Security/login'); |
| 31 | - } else if (!Permission::check('ACCESS_USER_INVITATIONS')){ |
|
| 31 | + } else if (!Permission::check('ACCESS_USER_INVITATIONS')) { |
|
| 32 | 32 | return Security::permissionFailure(); |
| 33 | 33 | |
| 34 | 34 | } else return $this->renderWith(array('UserController', 'Page')); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function sendInvite($data, Form $form) |
| 68 | 68 | { |
| 69 | - if (!Permission::check('ACCESS_USER_INVITATIONS')){ |
|
| 69 | + if (!Permission::check('ACCESS_USER_INVITATIONS')) { |
|
| 70 | 70 | $form->sessionMessage( |
| 71 | 71 | _t( |
| 72 | 72 | 'UserController.PERMISSION_FAILURE', |