return true;
}
-# return username if a session exists and is authenticated
+# depricated
function session_exists_and_authed() {
+ return logged_in();
+}
+
+# return username if a session exists and is authenticated
+function logged_in() {
if(!session_exists()) {
return false;
}
}
+
+# return username if a session exists and is authenticated
+function logged_in_as_admin() {
+ if(!session_exists()) {
+ return false;
+ }
+
+ if(session_get('auth_admin')) {
+ return true;
+ }
+ return false;
+}
+
+
# find existing session, or make one
function init_session() {
if(!session_exists()) {