Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for logged in user
#3
yojoe Wrote:You'd have to use isset to check if a cookie exist, rather than checking boolean value of cookie_check() function.
Anyway, you won't check it without knowing name of the cookie, and it's not that simple, as the name contains the salt value.
Something like: getsimple_cookie_203rwzy^|epaw*ekf7zuj2m3o4ga3o~fw5tbatt

Maybe just looking if a cookie starting with "getsimple_cookie_" chars exist and is not null would be enough ?

Well, I've looked at a couple of plugins:
http://get-simple.info/forum/post/6074/#p6074
and
http://get-simple.info/extend/plugin/edi...plugin/26/

The first hooks into login/logout and sets/checks its own cookie.

The second duplicates some of the stuff in the cookie_check() function.

Any guidance on what is better?

EDIT: Looks like I can't include configuration.php in the pre and post template hooks, I end up with an error:
Code:
Notice: Undefined variable: site_full_name in /public_html/admin/inc/theme_functions.php on line 150

Notice: Undefined variable: site_version_no in /public_html/admin/inc/theme_functions.php on line 150

-Rob A>
Reply


Messages In This Thread
Check for logged in user - by RobA - 2010-11-16, 14:30:34
Check for logged in user - by yojoe - 2010-11-16, 17:39:40
Check for logged in user - by RobA - 2010-11-17, 06:31:10



Users browsing this thread: 1 Guest(s)