diff options
author | Aaron Parecki <aaron@parecki.com> | 2019-02-24 14:01:27 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 14:01:27 -0600 |
commit | c38d6c9d09211976b63200dfd1d384bf890fc002 (patch) | |
tree | 2780d7f08cda7faef0132b0b615dec2fcbccc59c /lib | |
parent | acc8a8e673b1b71ea828422ec15f77450a409983 (diff) | |
parent | d30486e7c610e2ba2998ed5997fd86c6dcae5c77 (diff) |
Merge pull request #108 from dshanske/profile
Simple Addition of Profile Data to Quill
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helpers.php b/lib/helpers.php index 36e964b..0edaa5c 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -42,6 +42,17 @@ function session($key) { return null; } +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]; + } + return null; + } + function k($a, $k, $default=null) { if(is_array($k)) { $result = true; |