EllisLab text mark
Advanced Search
79 of 89
79
   
Ion Auth - Lightweight Auth System based on Redux Auth 2
Posted: 30 April 2012 05:35 PM   [ # 1171 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-11
92 posts
rip_pit - 08 March 2012 05:27 PM

I would need some advice about a problem i had with my app, ion_auth and firefox
It often log me out without asking then i sometimes must restart firefox to be able to login again

Solved, seems to be a know bug in codeigniter database session handling.
ID is regenerated too fast, it breaks.
I fixed it by installing CI Native Session and no more random disconnecting smile search the forum for more infos wink

 Signature 

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

 
Posted: 01 May 2012 09:20 PM   [ # 1172 ]   [ Rating: 0 ]
Joined: 2011-10-23
113 posts

Hi All,

I’ve got a very basic question ? How do I set up email notifications. In the Ion auth config file I’ve done:

$config['use_ci_email']false;

 
/**
  * Email config - 
  *  'file' = use the default CI config or use from a config file
  *  array = manually set your email config settings
  **/
 
$config['email_config']         = array(
  
'protocol'=>'smtp',
  
'smtp_host'=>'ssl://smtp.googlemail.com'//(SMTP server)
  
'smtp_port'=>'465'//(SMTP port)
  
'smtp_timeout'=>'30',
  
'smtp_user'=>'**********'//(user@gmail.com)
  
'smtp_pass'=>'**********'// (gmail password)
  
'mailtype' => 'html',
  
'charset' => 'utf-8',
  
'newline' => "\r\n",
 );
 
But Its not working,

Thanks in advance,

Bill 
 
Posted: 02 May 2012 06:27 AM   [ # 1173 ]   [ Rating: 0 ]
Joined: 2012-05-02
1 posts

Hello My friend Ben.

Thanks you and thanks for your solution,Ion Auth.

I have used Ion Auth in my project and I want to customize user table but I have not understood yet.
please show me how to change it or where i can find a proper post in order to solve my problem.

Thanks for your help.

 
Posted: 02 May 2012 12:29 PM   [ # 1174 ]   [ Rating: 0 ]
Joined: 2011-10-23
113 posts

Hi,

I have got it working.

the steps are:

1) change in application/config/ion_auth.php:

$config['use_ci_email']false;
$config['email_config']         'email'

2) create new config file called email.php, with the following content:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| Email
| -------------------------------------------------------------------------
| This file lets you define parameters for sending emails.
| Please see the user guide for info:
|
| http://ellislab.com/codeigniter/user-guide/libraries/email.html
|
*/
$config['protocol']='smtp';

$config['smtp_host']='ssl://smtp.googlemail.com'//(SMTP server)

$config['smtp_port']='465'//(SMTP port)

$config['smtp_timeout']='30';

$config['smtp_user']='realoption11@gmail.com'//(user@gmail.com)

$config['smtp_pass']='qwertyuiop93'// (gmail password)


$config['mailtype''html';
$config['charset''utf-8';
$config['newline'"\r\n";


/* End of file email.php */
/* Location: ./application/config/email.php */ 

3) drop it into the application/config folder.

It should work now,

Regards,

Bill

 

 
Posted: 03 May 2012 01:02 AM   [ # 1175 ]   [ Rating: 0 ]
Joined: 2012-04-30
12 posts

I downloaded Ion Auth library. I’m very new to codeigniter and need a little guidance using your library. Think of my site as being similar to craigslist.


I have 4 types of users
Listers- people who list ads
Viewers - People who view ads
One- Time - Listers (They dont have a subscription, they can only post one ad (pay as you go type thingy)
Admin - activate all of the above

Question - how do I set up these different users——?

 
Posted: 06 May 2012 02:23 PM   [ # 1176 ]   [ Rating: 0 ]
Joined: 2010-10-06
117 posts

Hi Ben, can I use my own tables? I mean I have a PostgreSQL database and this DB can’t be changed so there is a table for users but not for groups and permissions. So any tips?

 
Posted: 10 May 2012 05:29 PM   [ # 1177 ]   [ Rating: 0 ]
Joined: 2010-09-23
7 posts

How do I set new groups to a user?

I’m using this:

$post_array = array(
                  
'username' => 'username_name',
                  
'email' => 'the email',
                  
'password' => 'passtext',
                  
'first_name' => 'name',
                  
'last_name' => 'lname',
                  
'phone' => '3692587',
                  
'group' => Array
                                  (
'2','3'));

$this->ion_auth->update($primary_key$post_array); 

 

but nothing happens. any idea?

 
Posted: 11 May 2012 09:12 AM   [ # 1178 ]   [ Rating: 0 ]
Joined: 2012-05-11
3 posts

Hi Ben,

First of all, I wanted to thank you for the great job you have made with Ion Auth. Discovering the possibilites everyday, and I have to admit it helps me a lot with my projects !

Wanted to point something out though. In your language files, there is a missing tag :

$lang['login_unsuccessful_not_active'''

Not sure if it has already pointed out, just wanted to mention it in case.

Anyway, here is the translation at least for French (since I am) :

$lang['login_unsuccessful_not_active''Ce compte est inactif. Veuillez contacter votre administrateur.'

Hope it helps smile

 
Posted: 11 May 2012 09:16 AM   [ # 1179 ]   [ Rating: 0 ]
Avatar
Joined: 2010-03-31
205 posts
SlasHo - 10 May 2012 05:29 PM

How do I set new groups to a user?

I’m using this:

$post_array = array(
                  
'username' => 'username_name',
                  
'email' => 'the email',
                  
'password' => 'passtext',
                  
'first_name' => 'name',
                  
'last_name' => 'lname',
                  
'phone' => '3692587',
                  
'grupos' => Array
                                  (
'2','3'));

$this->ion_auth->update($primary_key$post_array); 

but nothing happens. any idea?

you are spelling groups wrong.

 

 Signature 

Tell me and I forget. Teach me and I remember. Involve me and I learn. ~ Benjamin Franklin

 
Posted: 11 May 2012 09:19 AM   [ # 1180 ]   [ Rating: 0 ]
Joined: 2010-09-23
7 posts
Matalina - 11 May 2012 09:16 AM
SlasHo - 10 May 2012 05:29 PM

How do I set new groups to a user?

I’m using this:

$post_array = array(
                  
'username' => 'username_name',
                  
'email' => 'the email',
                  
'password' => 'passtext',
                  
'first_name' => 'name',
                  
'last_name' => 'lname',
                  
'phone' => '3692587',
                  
'grupos' => Array
                                  (
'2','3'));

$this->ion_auth->update($primary_key$post_array); 

but nothing happens. any idea?

you are spelling groups wrong.


I did corrected, tried: group, groups

with no results.

 
Posted: 23 May 2012 04:06 AM   [ # 1181 ]   [ Rating: 0 ]
Joined: 2012-05-23
10 posts

I am starting work on an application that will house multiple company’s with multiple users per company.

Depending on what company they work for and what their rights are different data will be loaded.

How suitable is Ion Auth for this? Is there an option for this within Ion Auth? Cause I am guessing the groups are ment for different right sets and not for say company separation?

 
Posted: 23 May 2012 05:00 AM   [ # 1182 ]   [ Rating: 0 ]
Avatar
Joined: 2011-02-23
182 posts
nl_vinyl - 23 May 2012 04:06 AM

I am starting work on an application that will house multiple company’s with multiple users per company.

Depending on what company they work for and what their rights are different data will be loaded.

How suitable is Ion Auth for this? Is there an option for this within Ion Auth? Cause I am guessing the groups are ment for different right sets and not for say company separation?

Yeah, it looks like you need another layer of separation on top of the existing groups. I don’t imagine it’s impossible to modify the library and model to make this work.

In addition, if you’d like a hacky solution, you can make different groups that have the company and rights builtin. It will be unwieldy, but you can get started immediately without modifying anything. Like instead of having two companies, MS and Apple with sub-groups like SysAdmins and Programmers; you’ll have 4 groups MS_SysAdmins, MS_Programmers, Apple_SysAdmins, Apple_Programmers. Like I said, it’s going to be unwieldy, but when things are urgent you gotta do something!

 Signature 

Circle me on google plus. Follow me on twitter. Look me up on forrst. And check out these superb premium domains that are up for sale.

 
Posted: 23 May 2012 05:53 AM   [ # 1183 ]   [ Rating: 0 ]
Joined: 2012-05-23
10 posts

Yeah I was thinking about that too, only was hoping a less “hacky” solution might be possible smile

 
Posted: 23 May 2012 04:26 PM   [ # 1184 ]   [ Rating: 0 ]
Avatar
Joined: 2010-09-19
19 posts

If you have only one company per user you could add an extra column to the user table, or even use the existing Company column.
You’d just need to use something like

CONO $this->ion_auth->user()->row()->company 

in any table access.

 
Posted: 25 May 2012 03:14 PM   [ # 1185 ]   [ Rating: 0 ]
Avatar
Joined: 2012-05-25
5 posts

Hello friends, just started digging into ion_auth and it looks pretty great. Gonna save me some time.
I have a question on expanding data on the users. I need to have information on addresses for all my users. Street/city/state/zip, the usual stuff. Should I add these fields to the users table or make my own table for user data? If I make the fields non-null, will that break inserts when ion_auth creates users?

Edit:
I have a follow up question. Is it ok to use

$this->ion_auth->is_admin() 

or other user checks in the constructor of a Controller? If the authorization check fails, I want to redirect the user right away, without having to put in a checking code at the top of all the methods in the controller class. Whats the best way to do this and avoid code duplication?

 
79 of 89
79