Welcome Guest, Not a member yet? Register   Sign In
Checking if a string is empty?
#7

another way to do this that is very flexible - validate the session and then return something useful like a $user object,
and if it doesn't come back then show the log in.

PHP Code:
if( ! $user $this->users->returnActiveUser() ){ $this->showLogin() ; } 

that way you can change the session validation in users but the controller that is calling it does not have to change.
Reply


Messages In This Thread
Checking if a string is empty? - by lexxtoronto - 04-22-2015, 08:24 AM
RE: Checking if a string is empty? - by Narf - 04-22-2015, 08:37 AM
RE: Checking if a string is empty? - by Rufnex - 04-22-2015, 08:50 AM
RE: Checking if a string is empty? - by cartalot - 04-22-2015, 02:12 PM
RE: Checking if a string is empty? - by cartalot - 04-23-2015, 03:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB