CodeIgniter Forums
Redux Auth Protected Pages - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Redux Auth Protected Pages (/showthread.php?tid=18967)



Redux Auth Protected Pages - El Forum - 05-23-2009

[eluser]Timothy_[/eluser]
Hello,

Im using the Redux Authentication package 2. BETA Release.

Im trying to figure out how I can get controllers to check if a user has logged in.

I have done a fair bit of research and it looks like Redux Uses a variable called $status to output a boolean value.

However after trying this it looks like the variable isn't globally accessible.

I also found in my research some code that looks like this

Code:
function index(){


                if($this->redux_auth->logged_in()){



                        […]



                }else{



                        […]



                }

        }

Shame it doesnt work for me.

Any help would be appreciated.

Thanks

Tim

PS. I love CodeIgniter!!!!


Redux Auth Protected Pages - El Forum - 05-24-2009

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

Where are you loading the library? It would also help if you showed us more code. $this->redux_auth->logged_in() will work once the library is loaded properly. Do you get any errors when you call this method?


Redux Auth Protected Pages - El Forum - 05-24-2009

[eluser]Timothy_[/eluser]
Hello TheFuzzy0ne

Thanks for your response.

I tried it again and this time it worked. Before the whole page just crashed so i guess it must have been syntax. Thankyou though for encouraging me to try again.

Tim