EllisLab text mark
Advanced Search
84 of 89
84
   
Ion Auth - Lightweight Auth System based on Redux Auth 2
Posted: 18 July 2012 07:06 PM   [ # 1251 ]   [ Rating: 0 ]
Avatar
Joined: 2009-07-26
823 posts

Hey Miguel Suárez,

It’s not commented out in the latest code, maybe you have an older version?

 Signature 

BenEdmunds.com

Contact Me:                                    My Code: 

  ben.edmunds@gmail.com            Github
  @benedmunds

 
Posted: 18 July 2012 08:47 PM   [ # 1252 ]   [ Rating: 0 ]
Avatar
Joined: 2012-07-17
5 posts

I probably don’t have the latest version, but I downloaded it yesterday, maybe some one removed the comment some time after I downloaded It.

 
Posted: 19 July 2012 07:51 PM   [ # 1253 ]   [ Rating: 0 ]
Avatar
Joined: 2012-06-09
82 posts

Hi, do I need to escape user inputted data when using the built in functions of ion auth? Like when creating a new user using ion_auth->register() ? or It is auto escaped by the ion auth functions? And one more thing, how can I create new user groups? Because the default is just admin and member, can I add new user groups like contributor and subscriber? If yes, how can I do that? Thanks again in advance smile

 
Posted: 19 July 2012 08:50 PM   [ # 1254 ]   [ Rating: 0 ]
Avatar
Joined: 2012-06-09
82 posts

Hi, I want to report something. I encountered a problem in displaying the change password success messages after forgot pasword. The flash_data is being cleared by the $this->ion_auth->logout() method.

Here is the code after successfuly changing password after forgot password:

if ($change)
     
//if the password was successfully changed
      
$this->session->set_flashdata('message'$this->ion_auth->messages());
      
      
$this->session->set_flashdata('try''password changed!');
      
      
$this->session->set_userdata('some_name''some_value');
      
      
      
$this->logout();
     
}






function logout()
 
{
  $this
->data['title'"Logout";
  
  
//log the user out
  
$logout $this->ion_auth->logout();

  
//redirect them back to the page they came from
  
redirect('login''refresh');
 
}




Here is the problem in the logout
() in Ion Auth

 
/**
  * logout
  *
  * @return void
  * @author Mathew
  **/
 
public function logout()
 

  
//Recreate the session
  
$this->session->sess_destroy();   // this is destroying all session data thats why the success message is being cleared. 
 
 

 

 

 

 
Posted: 23 July 2012 04:47 AM   [ # 1255 ]   [ Rating: 0 ]
Avatar
Joined: 2012-07-19
32 posts

I’ve got a problem adding users using the form found in ‘/auth/create_user.php’, when I try add a user, I get an error page with the following message:

Error Number:

Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.

INSERT INTO AESW_users (first_name, last_name, company, username, password, email, ip_address, created_on, last_login, active) VALUES (‘First’, ‘Last’, ‘Company’, ‘first last’, ‘91d926115b5d238dd12fd83e3cb7d8b7014e34ca’, ‘bla@bla.com’, ‘’, 1343032245, 1343032245, 1)

Filename: C:\EasyPHP\www\AESPortal_CI\system\database\DB_driver.php

Line Number: 330

Looking at the values in the query, it’s trying to write an empty string to the [ip_address] field.. I’m not too worried about logging IP addresses though, this will only be used on a company WAN.

I’m using EasyPHP 12 in my dev environment, with PHP 5.3.9 using a DB on SQL2005. The provided SQL scripts didn’t work for me, so I manually created the tables in Management Studio, as per the ‘ion_auth.mssql.sql’ file in the download, I setup [ip_address] with a data type of varbinary(16).

Any suggestions here?

 
Posted: 23 July 2012 05:12 PM   [ # 1256 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-11
92 posts
ZaLiTHkA - 23 July 2012 04:47 AM

Looking at the values in the query, it’s trying to write an empty string to the [ip_address] field.. I’m not too worried about logging IP addresses though, this will only be used on a company WAN.
...
I setup [ip_address] with a data type of varbinary(16).

i encounter a problem too with ion auth login ips on my local server but i can’t really remember how i solved it

What’s says your logs ? CI logs / php / apache / mysql logs ?

i remember of inet_pton function but i’m not sure it was directly related

 Signature 

WAMPSERVER: http://www.wampserver.com/
NETBEANS 7: http://netbeans.org
MAXTHON 3: http://www.maxthon.com
Win7 64bits

 
Posted: 24 July 2012 02:46 AM   [ # 1257 ]   [ Rating: 0 ]
Avatar
Joined: 2012-07-19
32 posts
rip_pit - 23 July 2012 05:12 PM

What’s says your logs ? CI logs / php / apache / mysql logs ?

The CI forum won’t let me post the relative lines from my log (I get message about not being able to post certain content), so I dropped the lines in Pastebin for now.

There’s nothing in the Apache log (which makes sense, this looks like a PHP issue). I’m using MSSQL not MySQL, watching SQL Profiler while I try create a user, SQL itself doesn’t ever get to the point of trying to run any insert statement. I do see a line with a SELECT from the users table looking for entries with the same username as the user I’m trying to create, but other than that, I don’t see anything else helpful there.

 
Posted: 26 July 2012 08:26 PM   [ # 1258 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-11
92 posts

I never used mssql you should submit an issue ticket on the github project page (https://github.com/benedmunds/CodeIgniter-Ion-Auth/issues) including the pastebin url but i’m not sure if it’s related to CI itself or to Ion_auth
Sorry i will be a little help for you problem :’(

 Signature 

WAMPSERVER: http://www.wampserver.com/
NETBEANS 7: http://netbeans.org
MAXTHON 3: http://www.maxthon.com
Win7 64bits

 
Posted: 27 July 2012 02:22 PM   [ # 1259 ]   [ Rating: 0 ]
Avatar
Joined: 2012-05-25
5 posts

Yeah whats the story with how Ion_Auth stores IP addresses? I was surprised that it seem to store them as raw number instead of a string that I can more easily search/deal with.

Also, does Ion_Auth generate the documentation at http://benedmunds.com/ion_auth/ with a tool or is it just typed out as a HTML document? I’d like to work on the documentation but I’m not sure if I should embed it in the code or edit the docs directly.

 
Posted: 28 July 2012 04:35 AM   [ # 1260 ]   [ Rating: 0 ]
Avatar
Joined: 2012-06-09
82 posts

Hi, does anyone here got a pre setup HMVC modular extensions + Ion Auth library CodeIgniter. Or does anyone here got an idea how would I integrate Ion Auth with HMVC modular extension.

 
Posted: 28 July 2012 05:25 PM   [ # 1261 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-11
92 posts
sevengraff - 27 July 2012 02:22 PM

Yeah whats the story with how Ion_Auth stores IP addresses? I was surprised that it seem to store them as raw number instead of a string that I can more easily search/deal with.

Also, does Ion_Auth generate the documentation at http://benedmunds.com/ion_auth/ with a tool or is it just typed out as a HTML document? I’d like to work on the documentation but I’m not sure if I should embed it in the code or edit the docs directly.

i don’t know how IA doc is made but you could look at http://manual.phpdoc.org/HTMLframesConverter/default/ to build docs based on your code

 Signature 

WAMPSERVER: http://www.wampserver.com/
NETBEANS 7: http://netbeans.org
MAXTHON 3: http://www.maxthon.com
Win7 64bits

 
Posted: 04 August 2012 09:27 AM   [ # 1262 ]   [ Rating: 0 ]
Joined: 2012-03-06
10 posts

First I must say thank you for this awesome module!

Secondly I have a question, is there any way I can protect whole define page (ex: url/index.php/admin) without writing
if (!$this->ion_auth->logged_in())
  {
redirect('user/login');
}
  elseif (!$this->ion_auth->is_admin())
  {
//redirect them to the home page because they must be an administrator to view this
redirect($this->config->item('base_url'), 'refresh');
}
in every controller that loads views?

 
Posted: 04 August 2012 12:17 PM   [ # 1263 ]   [ Rating: 0 ]
Avatar
Joined: 2011-04-13
256 posts

This should help: http://philsturgeon.co.uk/blog/2010/02/CodeIgniter-Base-Classes-Keeping-it-DRY

 Signature 

Expert Web Development Backed by LIFETIME Guarantee
CI-Foundation v1
InfinityTracker - Project Management

 
Posted: 08 August 2012 05:27 PM   [ # 1264 ]   [ Rating: 0 ]
Avatar
Joined: 2012-05-25
5 posts

How do I change the groups that a registered user is in? update() just takes a $data array but only updates the user table, not the users_groups table. Also, there is a get_users_groups() but no corresponding set_users_groups().
The docs list both update_user() and update() but I only see an implementation for update().

edit
Oh there is an undocument function, add_to_group( $groupid, $userid ) that will do it. Super cool, just found it in the model, gonna play around with it.

 
Posted: 13 August 2012 07:07 AM   [ # 1265 ]   [ Rating: 0 ]
Joined: 2012-03-06
10 posts
Mirge - 04 August 2012 12:17 PM

This should help: http://philsturgeon.co.uk/blog/2010/02/CodeIgniter-Base-Classes-Keeping-it-DRY

I tried with this one
http://jondavidjohn.com/blog/2011/01/scalable-login-system-for-codeigniter-ion_auth

but it’s not working anymore and github contains only basic stuff without extended controller etc.
Also tutorial is a little mess, it contains Admin_Controller where it’s saying “create MY_Controller.php” etc.

Does anyone have working version of how to protected pages or load user informations into object $the_user which would contain all user information with GROUP included? Because I couldn’t find none.

I really don’t like to copy/paste 10 lines of code to each controller.

 
84 of 89
84