@@ -236,17 +236,20 @@ |
||
| 236 | 236 | * @return boolean|\Users\User |
| 237 | 237 | */ |
| 238 | 238 | public function get($idn, $ltype = 'id') { |
| 239 | - if (!$idn) |
|
| 240 | - return false; |
|
| 239 | + if (!$idn) { |
|
| 240 | + return false; |
|
| 241 | + } |
|
| 241 | 242 | |
| 242 | - if (is_numeric($idn) && $ltype != 'login') |
|
| 243 | - $user = Users\User::get($idn, 'id'); |
|
| 244 | - elseif ($ltype == 'login') |
|
| 245 | - $user = Users\User::get($idn, 'login'); |
|
| 246 | - else |
|
| 247 | - $user = Users\User::get($idn, 'mail'); |
|
| 248 | - if (!$user) |
|
| 249 | - return []; |
|
| 243 | + if (is_numeric($idn) && $ltype != 'login') { |
|
| 244 | + $user = Users\User::get($idn, 'id'); |
|
| 245 | + } elseif ($ltype == 'login') { |
|
| 246 | + $user = Users\User::get($idn, 'login'); |
|
| 247 | + } else { |
|
| 248 | + $user = Users\User::get($idn, 'mail'); |
|
| 249 | + } |
|
| 250 | + if (!$user) { |
|
| 251 | + return []; |
|
| 252 | + } |
|
| 250 | 253 | |
| 251 | 254 | return $user; |
| 252 | 255 | } |