diff options
author | Aaron Parecki <aaron@parecki.com> | 2019-03-10 12:49:41 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2019-03-10 12:49:41 -0700 |
commit | b71c31f7bb9b5e5ff07b195b82940bbd9ded69ec (patch) | |
tree | 3d8d377507a95670a527afaeb66b2155344f9e0e /lib/helpers.php | |
parent | 7e134358b506fc90e269c92570f6717e1461ad1a (diff) |
cleanup
Diffstat (limited to 'lib/helpers.php')
-rw-r--r-- | lib/helpers.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/helpers.php b/lib/helpers.php index 0edaa5c..7dca36d 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -43,15 +43,15 @@ function session($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; - } + } + $auth = session('auth'); + if(isset($auth['profile'][$key])) { + return $auth['profile'][$key]; + } + return null; +} function k($a, $k, $default=null) { if(is_array($k)) { |