ion-auth

Registration with CodeIgniter Ion Auth

ⅰ亾dé卋堺 提交于 2019-12-10 12:05:06
问题 I am trying to register a user with Ion Auth, but the register() function does not seem to report any error messages. How does one register with Ion Auth? I've already read various tutorials like this one and this one (and the documentation), but they do not seem to be working. function register() { // do not allow registration if logged in if ($this->ion_auth->logged_in()) { redirect('/'); } $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); $this->form

What is proper way to secure CodeIgniter 2 application with authentication?

99封情书 提交于 2019-12-07 09:10:17
问题 I have Ion Auth properly installed and working on my server. I also have the default CodeIgniter 2 "news" tutorial working in the same CI installation. I'm just playing around and curious about the proper way to use the authentication system to "enclose" or protect an entire application. For this question, let's use the "news" tutorial that comes with CI. Inside the index() function in my news.php controller, I added conditional code to check if the user is logged in. If not, the user is just

How to prevent auto logout in codeigniter?

ぃ、小莉子 提交于 2019-12-06 18:19:45
问题 i am using codeigniter with ion_auth configured ,and MySQL as back-end, my app run smoothly but sometime/not randomly when i call add/update functions it automatically log me out. i am working on it for last 1 months but found no solution so far ? i also change setting in ion_auth config file. $config['user_expire'] = 0; any idea ,solution to this problem? please comment ,so that i can provide more data if needed. Note: i have also check this but no luck. 回答1: You are probably performing ajax

What is proper way to secure CodeIgniter 2 application with authentication?

左心房为你撑大大i 提交于 2019-12-05 12:37:45
I have Ion Auth properly installed and working on my server. I also have the default CodeIgniter 2 "news" tutorial working in the same CI installation. I'm just playing around and curious about the proper way to use the authentication system to "enclose" or protect an entire application. For this question, let's use the "news" tutorial that comes with CI. Inside the index() function in my news.php controller, I added conditional code to check if the user is logged in. If not, the user is just taken to the login screen. public function index() { $data['news'] = $this->news_model->get_news();

Creating a login form in CodeIgniter based on Ion Auth library

一世执手 提交于 2019-12-05 02:13:51
问题 I'm still learning my way around in CodeIgniter. I'd like to create a login form in my codeigniter application based on Ion Auth library. I have installed the library following the instruction and it works fine when navigating to auth/login, auth/create_user, auth/logout, etc... However, I don't need a stand alone page for login, I'd like to embed the form in my homepage. When I use the sample provided login view in my homepage, I get the following errors: Message: Undefined variable: message

How to prevent auto logout in codeigniter?

北慕城南 提交于 2019-12-04 23:32:57
i am using codeigniter with ion_auth configured ,and MySQL as back-end, my app run smoothly but sometime/not randomly when i call add/update functions it automatically log me out. i am working on it for last 1 months but found no solution so far ? i also change setting in ion_auth config file. $config['user_expire'] = 0; any idea ,solution to this problem? please comment ,so that i can provide more data if needed. Note: i have also check this but no luck. You are probably performing ajax requests, this is a common issue... I would suggest you to use session database and make ajax calls is to

how can a page redirect users back to previous page if they try to access the page via url?

笑着哭i 提交于 2019-12-04 05:47:12
I have a login page which won't be accessible if user is already logged in. So login page tries to redirect logged in users back to the page where they came from. Redirect works if users click a link to go to a page. Problem is if users are in About page try to access login page via url then the referrer agent won't be set so login page is not redirecting users back to About page, instead it is redirecting back to the base url ( i'm using codeigniter and ion auth library). login page's redirect code as below: if($this->ion_auth->logged_in()) { redirect($this->agent->referrer(), 'refresh'); }

Creating a login form in CodeIgniter based on Ion Auth library

会有一股神秘感。 提交于 2019-12-03 17:12:34
I'm still learning my way around in CodeIgniter. I'd like to create a login form in my codeigniter application based on Ion Auth library . I have installed the library following the instruction and it works fine when navigating to auth/login, auth/create_user, auth/logout, etc... However, I don't need a stand alone page for login, I'd like to embed the form in my homepage. When I use the sample provided login view in my homepage, I get the following errors: Message: Undefined variable: message Message: Undefined variable: identity Message: Undefined variable: password I realize that the above

Website is unable to properly retrieve session information after PHP update

走远了吗. 提交于 2019-12-02 06:26:23
问题 I had some very simple code on a website to handle logins on the root of the site using ion_auth: if(!$this->ion_auth->logged_in()) { redirect("/login"); } That page posts to /auth/login, which is handled by ion_auth. If the login is successful, the user is redirected to the root of the site. Otherwise, they go back to /login to try again. I initially thought I'd forgotten the password, but with a series of var_dump() calls, I found that the login is successful, but the call to $this->ion

IonAuth - seems to be randomly logging me out

孤者浪人 提交于 2019-11-30 03:56:15
I'm using ionAuth & it seems to be logging me out almost randomly? I'm using Codeigniter v2.1.4 - it logs in perfect fine however ionAuth seems to log out at random intevals, is there a way to force the session to stay active until I call the ionAuth->logout function? My CI config looks like as follows: $config['sess_cookie_name'] = 'cisession'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match