Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f250e40
)
CONFLICT WARNING: added: logged_in() and logged_in_as_admin()
author
Jason Woofenden
<jason283@herkamire.com>
Thu, 19 Mar 2009 08:22:08 +0000
(
04:22
-0400)
committer
Jason Woofenden
<jason283@herkamire.com>
Thu, 19 Mar 2009 08:22:08 +0000
(
04:22
-0400)
session.php
patch
|
blob
|
history
diff --git
a/session.php
b/session.php
index
b36af68
..
9dc3f4e
100644
(file)
--- a/
session.php
+++ b/
session.php
@@
-125,8
+125,13
@@
function session_exists() {
return true;
}
return true;
}
-# return username if a session exists and is authenticated
+# depricated
function session_exists_and_authed() {
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;
}
if(!session_exists()) {
return false;
}
@@
-135,6
+140,20
@@
function session_exists_and_authed() {
}
}
+
+# 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()) {
# find existing session, or make one
function init_session() {
if(!session_exists()) {