CodeIgniter Forums

Full Version: Please help me understand $this->site_sentry->login_routine()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Tony W[/eluser]
I saw below script in the login file of Bamboo Invoice
Quote:if (isset($username) && $username != '') { // if they tried to login
$user_id = $this->site_sentry->login_routine();
}

But I don't understand what $this->site_sentry->login_routine() means. Can someone explain it a little bit?

Thanks!

El Forum

[eluser]Derek Allard[/eluser]
Sure Tony. In application/config/autoload.php you'll see tis

Code:
$autoload['libraries'] = array('database', 'site_sentry', 'session');

The important thing to note here is that Bamboo is loading a library named "site_sentry". You can find it in application/libraries. Any calls to $this->site_sentry are referring to it. In this case, look for a function named "login_routine()".

I should add that I didn't write site_sentry, it was one of the first auth-style scripts generated by the CI community, and I took it for my own uses several years ago. Thanks James Nicol for writing it!

El Forum

[eluser]Triple_vent[/eluser]
i really appreciate for your explanation, it really helpful for beginner like me, once again thank for your Bambooinvoice

El Forum

[eluser]Mr.President[/eluser]
thx for bamboinvoice app it really helps us to understand CI !! thx darek

El Forum

[eluser]Unknown[/eluser]
Thanks for Bambooinvoice. It has really taught me developing apps using CI.

El Forum

[eluser]Derek Allard[/eluser]
You are very welcome. I released it exactly so it would be helpful as a learning tool - thanks so much for taking the time to say it was helpful, it means a lot.

El Forum

[eluser]selinan[/eluser]
if (isset($username) && $username != ‘’) this is judge the login name, can't to be empty,