@@ -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') |
@@ -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')); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | $invite = UserInvitation::create(); |
82 | - if (!Permission::check('ACCESS_USER_INVITATIONS')){ |
|
82 | + if (!Permission::check('ACCESS_USER_INVITATIONS')) { |
|
83 | 83 | $form->saveInto($invite); |
84 | 84 | try { |
85 | 85 | $invite->write(); |
@@ -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() |