From d30486e7c610e2ba2998ed5997fd86c6dcae5c77 Mon Sep 17 00:00:00 2001 From: David Shanske Date: Sun, 24 Feb 2019 19:44:12 +0000 Subject: Simple Addition of Profile Data to Quill --- lib/helpers.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/helpers.php') 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; -- cgit v1.2.3