Welcome Guest, Not a member yet? Register   Sign In
Please help me understand $this->site_sentry->login_routine()
#1

[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!
#2

[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!
#3

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

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

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

[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.
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB