CodeIgniter Forums
2 user login in 1 codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: 2 user login in 1 codeigniter (/showthread.php?tid=69290)



2 user login in 1 codeigniter - istinurhalimah - 11-01-2017

Hello, good afternoon. I am new member here, I want to ask related framework. how do i make 2 login user in one codeIgniter? or is there another way to make 2 user login in create a website in Sublime Text 3? please help yaa all, thank you.


RE: 2 user login in 1 codeigniter - PaulD - 11-01-2017

Not sure what you mean... sorry.

Do you mean you want two login methods, or a login method for two users?

If the former, you can easily create a login controller/library/model that detects which login method the person has selected (and by detected I mean you send a code in a hidden post field on each login screen) or you have two login methods that each set the same authorisation code, that your authorisation function (like 'check_user_logged_in()' method) can read. Or you have your check_user method check two settings (such as two different cookies) to see if they pass the logged_in check.

If the latter, then that is the same as any auth system, it is just that you only have two user accounts.

Not sure that was any help,

Paul.