简体   繁体   中英

How to Load Tank Auth views into other views

I am Starting to work with codeigniter and am using Tank Auth as my Authentication Library. Currently trying to set up my application so the pages mysite.com/login and mysite.com/signup are custom views that load the login_form.php and register_form.php within the view I create.

Currently I have a pages class that loads my custom views using a view method. Within the view method of my pages class I load the view using:

$this->load->view('auth/login_form');

to load the view. When I go to the mysite.com/login I receive the following error

Fatal error: Call to undefined function set_value() in ..\\application\\views\\auth\\login_form.php on line 5

I receive the same error when trying to load the register_form.php view.

Is there another way of loading the content within the Tank Auth views into another view?

I've got exactly the same question. The problem as I see it is that the view login_form is designed to cater for everything (forgotten passwords, captchas, etc) in one. What I'm trying to create is a system where there is the quick login, and then if needed, another view to deal with registration, forgotten passwords, etc. I'm struggling to separate out the two objectives from this one login_form form.

The auth controller login function has all that logic, and then simply $this->load->view('auth/login_form', $data);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM