got any ideas on this? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: got any ideas on this? (/showthread.php?tid=4117) Pages:
1
2
|
got any ideas on this? - El Forum - 11-07-2007 [eluser]mistress_shiira[/eluser] good day guys!im still new to CI and ive been trying to learn how to use a framework such as this. im currently redoing an admin page that i have developed without using any framework before.i would like to redo it using CI.unfortunately, i have come across this problem.hope you can tell me how to go about with this. actually i have this code: Quote:function index(){actually it already works,i can log in and proceed to the next page.the problem is that when i re enter the URL and hit enter,the page goes back to the admin page.how can i avoid it doing that? got any ideas on this? - El Forum - 11-07-2007 [eluser]schnoodles[/eluser] Im guessing this is a login system, in that case what you want to do is in validation success use session and store something like logged_in=1 so you can do if($this->session->userdata('logged_in')) { //take them to a logged in page } got any ideas on this? - El Forum - 11-07-2007 [eluser]mistress_shiira[/eluser] [quote author="schnoodles" date="1194511473"]Im guessing this is a login system, in that case what you want to do is in validation success use session and store something like logged_in=1 so you can do if($this->session->userdata('logged_in')) { //take them to a logged in page }[/quote] heres a pseudocode of what i did: check if validation->run set $this->session->set_userdata('logged_in',1); and load $this->load->view('mainpage'); else load $this->load->view('loginpage'); i get an error on $this->session->set_userdata though got any ideas on this? - El Forum - 11-07-2007 [eluser]llbbl[/eluser] if you can wait like another 2 weeks for me, I will release my user authentication system, that is very easy to use. It might save you some work. got any ideas on this? - El Forum - 11-07-2007 [eluser]mistress_shiira[/eluser] llbbl,uve been a great help! yeah,sure ill wait for that user auth system that ur currently doing.anyways,im not in a hurry.i am in the study mode stage as of now. im trying to redevelop the projects that i did before this time using a framework which is codeigniter.just keep me posted. got any ideas on this? - El Forum - 11-08-2007 [eluser]schnoodles[/eluser] HawHaw if you wait about 1-3 days ill prob release mine, although its just a bunch of methods so you do the form validation and everything yourself then you just do $user->login($username,$password); got any ideas on this? - El Forum - 11-08-2007 [eluser]Rick Jolly[/eluser] [quote author="mistress_shiira" date="1194512010"] heres a pseudocode of what i did: check if validation->run set $this->session->set_userdata('logged_in',1); and load $this->load->view('mainpage'); else load $this->load->view('loginpage'); i get an error on $this->session->set_userdata though[/quote] If you load the session library it should work. got any ideas on this? - El Forum - 11-08-2007 [eluser]llbbl[/eluser] I need to do a couple things, one of them being make some documentation. I want to add roles (admin,user,whatever) and the appropriate functions. To check for those roles. Right now it does. - captcha based user registration - activation w/ link sent to the email used to register with - forgot password link sent to email, similar to activation, which allows them fill out a form - login/out form + classes - uses CI sessions got any ideas on this? - El Forum - 11-08-2007 [eluser]mistress_shiira[/eluser] i have decided to do this application as an MVC.but theres something thats confusing me.hope you can give me ideas on how to proceed. i have created a model,controller and a view for this particular exercise. i want to load first a view file that contains the log in page so in my main controller i call it like this: Quote: class main_control extends Controller{now,im stuck.:d i dont know how to proceed.after i have load the view for the log in page.what i want to do is to verify the input of the user before they can log in.i dont know where to put that anymore.do i have to do another controller for that?pls help me.. got any ideas on this? - El Forum - 11-08-2007 [eluser]llbbl[/eluser] read the user guide, Validation class. Also the you need to know how to write your own library file and call functions in the library. You will call a function called register or whatever in your library if the form validates. |