Website Membership error requiring a login

By rez - January 11, 2012

wm 1.06 cmsb 2.14

the plugin is installed but I receive an error when trying to redirect users who are not logged in.


Fatal error: Call to undefined function websitelogin_redirecttologin() in /home/xxxxx/public_html/page.php on line 8

// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
// require login
if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); }


thanks for your help.

Re: [rez] Website Membership error requiring a login

By Jason - January 11, 2012

Hi,

You need to connect to viewer_functions.php before you can do the $CURRENT_USER check. For example:

// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';

require_once($libraryPath);

// require login
if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); }


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/