@@ -24,6 +24,10 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | trait NavigationMenuAccessControl |
| 26 | 26 | { |
| 27 | + /** |
|
| 28 | + * @param string $name |
|
| 29 | + * @param boolean $value |
|
| 30 | + */ |
|
| 27 | 31 | protected abstract function assign($name, $value); |
| 28 | 32 | |
| 29 | 33 | /** |
@@ -32,7 +36,7 @@ discard block |
||
| 32 | 36 | protected abstract function getSecurityManager(); |
| 33 | 37 | |
| 34 | 38 | /** |
| 35 | - * @param $currentUser |
|
| 39 | + * @param \Waca\DataObjects\User $currentUser |
|
| 36 | 40 | */ |
| 37 | 41 | protected function setupNavMenuAccess($currentUser) |
| 38 | 42 | { |
@@ -44,6 +44,9 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + /** |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 47 | 50 | protected abstract function getRegistrationTemplate(); |
| 48 | 51 | |
| 49 | 52 | protected function isProtectedPage() |
@@ -70,12 +73,12 @@ discard block |
||
| 70 | 73 | } |
| 71 | 74 | |
| 72 | 75 | /** |
| 73 | - * @param $emailAddress |
|
| 74 | - * @param $password |
|
| 75 | - * @param $username |
|
| 76 | + * @param null|string $emailAddress |
|
| 77 | + * @param null|string $password |
|
| 78 | + * @param null|string $username |
|
| 76 | 79 | * @param $useOAuthSignup |
| 77 | - * @param $confirmationId |
|
| 78 | - * @param $onwikiUsername |
|
| 80 | + * @param null|integer $confirmationId |
|
| 81 | + * @param null|string $onwikiUsername |
|
| 79 | 82 | * |
| 80 | 83 | * @throws ApplicationLogicException |
| 81 | 84 | */ |
@@ -207,7 +207,8 @@ |
||
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - public function getRoleConfiguration(){ |
|
| 210 | + public function getRoleConfiguration() |
|
| 211 | + { |
|
| 211 | 212 | return $this->roleConfiguration; |
| 212 | 213 | } |
| 213 | 214 | } |
@@ -29,11 +29,11 @@ discard block |
||
| 29 | 29 | foreach ($users as $user) { |
| 30 | 30 | $toAdd = array('user'); |
| 31 | 31 | |
| 32 | - if($user['status'] === 'Admin'){ |
|
| 32 | + if($user['status'] === 'Admin') { |
|
| 33 | 33 | $toAdd[] = 'admin'; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if($user['checkuser'] == 1){ |
|
| 36 | + if($user['checkuser'] == 1) { |
|
| 37 | 37 | $toAdd[] = 'checkuser'; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $log->setComment($logData); |
| 61 | 61 | $log->save(); |
| 62 | 62 | |
| 63 | - if($user['status'] === 'Admin' || $user['status'] === 'User'){ |
|
| 63 | + if($user['status'] === 'Admin' || $user['status'] === 'User') { |
|
| 64 | 64 | $update->execute(array('id' => $user['id'])); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -52,7 +52,8 @@ discard block |
||
| 52 | 52 | return $this; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - public function statusIn($statuses) { |
|
| 55 | + public function statusIn($statuses) |
|
| 56 | + { |
|
| 56 | 57 | $this->inClause('status', $statuses); |
| 57 | 58 | |
| 58 | 59 | return $this; |
@@ -77,14 +78,16 @@ discard block |
||
| 77 | 78 | * |
| 78 | 79 | * @return $this |
| 79 | 80 | */ |
| 80 | - public function lastActiveBefore(DateTime $instant){ |
|
| 81 | + public function lastActiveBefore(DateTime $instant) |
|
| 82 | + { |
|
| 81 | 83 | $this->whereClause .= ' AND origin.lastactive < ?'; |
| 82 | 84 | $this->parameterList[] = $instant->format("Y-m-d H:i:s"); |
| 83 | 85 | |
| 84 | 86 | return $this; |
| 85 | 87 | } |
| 86 | 88 | |
| 87 | - public function getRoleMap(&$roleMap){ |
|
| 89 | + public function getRoleMap(&$roleMap) |
|
| 90 | + { |
|
| 88 | 91 | $query = <<<SQL |
| 89 | 92 | SELECT /* UserSearchHelper/roleMap */ |
| 90 | 93 | r.user user |
@@ -77,13 +77,15 @@ discard block |
||
| 77 | 77 | * @param string $column The required column |
| 78 | 78 | * @return array |
| 79 | 79 | */ |
| 80 | - public function fetchColumn($column){ |
|
| 80 | + public function fetchColumn($column) |
|
| 81 | + { |
|
| 81 | 82 | $statement = $this->getData(array($column)); |
| 82 | 83 | |
| 83 | 84 | return $statement->fetchAll(PDO::FETCH_COLUMN); |
| 84 | 85 | } |
| 85 | 86 | |
| 86 | - public function fetchMap($column){ |
|
| 87 | + public function fetchMap($column) |
|
| 88 | + { |
|
| 87 | 89 | $statement = $this->getData(array('id', $column)); |
| 88 | 90 | |
| 89 | 91 | $data = $statement->fetchAll(PDO::FETCH_ASSOC); |
@@ -192,12 +194,14 @@ discard block |
||
| 192 | 194 | return $query; |
| 193 | 195 | } |
| 194 | 196 | |
| 195 | - public function inIds($idList) { |
|
| 197 | + public function inIds($idList) |
|
| 198 | + { |
|
| 196 | 199 | $this->inClause('id', $idList); |
| 197 | 200 | return $this; |
| 198 | 201 | } |
| 199 | 202 | |
| 200 | - protected function inClause($column, $values) { |
|
| 203 | + protected function inClause($column, $values) |
|
| 204 | + { |
|
| 201 | 205 | if (count($values) === 0) { |
| 202 | 206 | return; |
| 203 | 207 | } |