Aaron Parecki
6 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
1 changed files with
8 additions and
8 deletions
-
lib/helpers.php
|
@ -43,15 +43,15 @@ function session($key) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function profile($key) { |
|
|
function profile($key) { |
|
|
if ( ! session('auth') ) { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
$auth = session('auth'); |
|
|
|
|
|
if ( array_key_exists('profile', $auth) && array_key_exists($key, $auth['profile'] ) ) { |
|
|
|
|
|
return $auth['profile'][$key]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(!session('auth')) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
$auth = session('auth'); |
|
|
|
|
|
if(isset($auth['profile'][$key])) { |
|
|
|
|
|
return $auth['profile'][$key]; |
|
|
|
|
|
} |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function k($a, $k, $default=null) { |
|
|
function k($a, $k, $default=null) { |
|
|
if(is_array($k)) { |
|
|
if(is_array($k)) { |
|
|