php - using Usercake to discover information about a user -


okay have think weird problem. i'm using usercake link page form of user management . works great , who'd not advanced in php/ db administration it's awesome. attempting change of page based if user logged in or not.

so link in forum attempting change pannel on page if user logged in first code snippet modified version of i'd use

if (isuserloggedin()){   print('     <ul class="login">                     <li class="left">&nbsp;</li>                     <li>hello   ');    echo $loggedinuser->username . " 2 c ya!" ;    print(' </li>             <li class="sep">|</li>             <li id="toggle">             <a id="open" class="open" href="#">log in | register</a>             <a id="close" style="display: none;" class="close" href="#">close panel</a>             </li>             <li class="right">&nbsp;</li>           </ul>             </div> <!-- / top -->     </div> <!--panel -->  '); }else{ ... normal  } 

now know isuserloggedin() because when logged in display changed place $loggedinuser->username left empty. reason why happening appreciated.

notes: have included 'models/config.php' in script , have used $loggedinuser->user_id on other pages no problem reason doesn't seem work here either. have logged in , out few times make sure not working i've read can hang whatever reason. code inside my_script / my_function included in larger page using php require 'my_script' if make difference again anyhelp in great

i'd suggest confirming require script has correct path, , adding in $session_start() confirm session correctly started.

following that, turn on php errors , use echos within usercake script confirm pages , functions calling correctly.

good luck


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -