Welcome Guest, Not a member yet? Register   Sign In
Best way for check user is logged in or not
#11

[eluser]xwero[/eluser]
I'm not breaking down the solution you brought forward but the way you have written the response. If you would have written the response without the first sentence part i wouldn't have reacted on your response.

You are right that someone first has to decide how much functionality the authentication/authorization process needs for the site they are developing. But there are all sizes of auth libraries, some offer only the basic features while others are full pledged.

MTuran wrote it took 14 hours to get this far, in that time he could have read the documentation of several libraries, tried out a few, picked the best one for the site an moved on to other things.

Libraries are not always the best solution but in this case i think it's the best option because then you can add the library to every site you do making the jump form site to site easier as it's familiar code you have to write/maintain. Of course you could use serveral libraries depending on the needs of the site.
If you extend the CI core to fit it for each specific site/app there is going to be a time you ask yourself why am i even using CI, i've been in that situation myself.
#12

[eluser]tkyy[/eluser]
Quote:I'm not breaking down the solution you brought forward but the way you have written the response. If you would have written the response without the first sentence part i wouldn't have reacted on your response.

no worries

Quote:If you extend the CI core to fit it for each specific site/app there is going to be a time you ask yourself why am i even using CI, i've been in that situation myself.

haha, man i have installs just laying around that you would almost not know it was ci anymore beyond the directory structure.

that particular thought has never crossed my mind though. codeigniter is pretty much what defines 'rapid development' for me personally- it doesnt have too much bulk its just the right amount of pre-coded stuff.

kohana is really good, rails is "fun" and zend is industry standard (i guess) but i always come back to the flexibility, uniformity and simplicity of a blank codeigniter install, even without stuff like ORM.
#13

[eluser]TheFuzzy0ne[/eluser]
Rispec'!
#14

[eluser]mTuran[/eluser]
i coded my own auth library and i am loading automatically from config.php on every page by this way i run auto_login method on every new visitor entrance. Thank you.
#15

[eluser]Roopam[/eluser]
I am new to CI, but I think the following should work

Code:
if($this->session->userdata('username'))
echo "logged in";
else
echo "wtf? register now";

assuming that username is one od the variables you set after logging in a user.




Theme © iAndrew 2016 - Forum software by © MyBB