Welcome Guest, Not a member yet? Register   Sign In
Two issues: Checking login status and mail CR/LF
#3

[eluser]xzela[/eluser]
drewbee is correct. You should roll some sort of custom made library and insert it into all of your constructors. I do exactly what he has suggested.

Here's what I've done for all of my controllers:
Code:
function __construct() {
    parent::Controller();
    $this->load->library('authorize'); //load the authorize lib
    $this->authorize->isLoggedIn(); //check to see if the user is logged in.
}

in fact, you could probably autoload the library itself. That way you don't have to load it in each constructor and save a line per controller.

just a suggestion.


Messages In This Thread
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 12:55 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 01:06 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 01:43 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 01:56 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 02:05 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 02:27 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 02:33 PM
Two issues: Checking login status and mail CR/LF - by El Forum - 01-30-2009, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB