]> git.mxchange.org Git - mailer.git/blobdiff - inc/session-functions.php
Added listing of sub id enhanced referral links in member area + used sub id in refer...
[mailer.git] / inc / session-functions.php
index 706a483c1c71f8e841a26ea005427ed2b524a99a..dc6c3ff8728f7d906250b2f601822c25a2e4020f 100644 (file)
@@ -115,12 +115,17 @@ function getSessionArray () {
 }
 
 // Destroy user session
-function destroyMemberSession () {
+function destroyMemberSession ($destroy = false) {
        // Reset userid
        initMemberId();
 
        // Remove all user data from session
-       return ((setSession('userid', '')) && (setSession('u_hash', '')));
+       if ($destroy === true) {
+               // Destroy whole session
+               return session_destroy();
+       } else {
+               return ((setSession('userid', '')) && (setSession('u_hash', '')));
+       }
 }
 
 // Destroys the admin session