ion-auth

Why doesn't Codeception's PhpBrowser follow a “Reload” header?

ぃ、小莉子 提交于 2020-01-14 10:08:44
问题 This is happening to me in a real CodeIgniter project in the Ion Auth authentication library, but for the sake of clarity, I have reduced it to it's simplest form. The script: I have this one line script located at http://localhost/~captbaritone/redirect/index.php : <?php header("Refresh:0;url=https://google.com");¬ In my browser, it redirects to Google.com. The Test: To test it I wrote this acceptance test: <?php $I = new WebGuy($scenario); $I->wantTo('Redirect to Google.com'); $I->amOnPage(

Why doesn't Codeception's PhpBrowser follow a “Reload” header?

最后都变了- 提交于 2020-01-14 10:06:45
问题 This is happening to me in a real CodeIgniter project in the Ion Auth authentication library, but for the sake of clarity, I have reduced it to it's simplest form. The script: I have this one line script located at http://localhost/~captbaritone/redirect/index.php : <?php header("Refresh:0;url=https://google.com");¬ In my browser, it redirects to Google.com. The Test: To test it I wrote this acceptance test: <?php $I = new WebGuy($scenario); $I->wantTo('Redirect to Google.com'); $I->amOnPage(

Add user to groups when creating user in Ion Auth using form_dropdown

偶尔善良 提交于 2020-01-02 10:19:17
问题 I add to auth controller in function create_user(): if ($this->ion_auth->is_admin()) { $this->data['groups'] = $this->ion_auth->groups()->result_array(); // выбираем все группы $groups=$this->data['groups']; } ... if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $groups)) ... Next in view I add dropdown field and want to populate it with all groups from table 'groups': <div class="grid_8"><p>Добавить в группы:<br /> <?php

Call to undefined function now()

99封情书 提交于 2019-12-25 16:20:48
问题 I'm using the Ion Auth library for the authentication system in a website I'm working on. It worked without any problem, but since yesterday I'm getting this error: PHP Fatal error: Call to undefined function now() in /home/carlo/public_html/website/application/models/ion_auth_model.php on line 996 The code in that line is this: $this->db->update($this->tables['users'], array('last_login' => now()), array('id' => $id)); I read that now() is a mysql function and in php you should use date(),

use ion auth authentication for codeigniter in another controller

谁说我不能喝 提交于 2019-12-20 03:14:05
问题 I am trying to build a web application with codeigniter. I have installed Ion Auth as my authentication model. The default Auth.php controller authenticates the user and sets up the session. <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Auth extends CI_Controller { function __construct() { parent::__construct(); $this->load->library('ion_auth'); $this->load->library('session'); $this->load->library('form_validation'); $this->load->helper('url'); $data['title']=

IonAuth - seems to be randomly logging me out

送分小仙女□ 提交于 2019-12-18 11:35:39
问题 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'] =

Troubleshooting codeigniter “Unable to locate the model you have specified…” error

帅比萌擦擦* 提交于 2019-12-13 04:54:15
问题 I have been developing a web application using CodeIgniter on my Mac with no issues whatsoever. I am using the Ion Auth library for user authentication. I have no ported the site the production server and I am getting the following error: An Error Was Encountered Unable to locate the model you have specified: Ion_auth_model All of the posts on here seem to be file placement or the case of the filename or class name. I have quadruple checked the ion auth model code.. /application/models/ion

Can I set Ion auth to login by username OR Email

妖精的绣舞 提交于 2019-12-12 12:17:54
问题 I know I can set ion auth to login by username in the config, I also know I can set it to login by email in the config. Is there a simple way to set it it to use either automatically? 回答1: If by automatic, you mean try one and then the other to see if either gives a valid return: The login occurs in ion_auth_model line: 899 ->where($this->identity_column, $this->db->escape_str($identity)) so you could change this to do an "or" and try both columns. You would need to do this throughout the

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

牧云@^-^@ 提交于 2019-12-12 08:48:52
问题 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

How to create sub groups in ion auth codeigniter?

邮差的信 提交于 2019-12-11 03:19:43
问题 I know we can create groups in ion auth. But I need sub group inside members and staff groups.The following user roles are required for my project. Admin Members plan A members plan B members plan C members Staff technical staff management staff general staff Based on plan selected by member, the 'views' and functionalities will change. I was thinking of adding a new column to users table to specify the plan used. Another option is to create 3 plan groups without parent member group. Is there