Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Auth

[eluser]opel[/eluser]
this is set in the Auth library

var $user_standard_group = 'user';

Andy my config/auth file is as follows :

Code:
$config['input_config'] = array(
        'login' =>     array(
                'identifier' => 'user_name', //name of the input that holds the identifier used for login
                'password' => 'user_password', //name of the input that holds the password used for login
                'remember' => 'remember_me' //name of the checkbox that says wether to remember the user or not
            ),
        'register' =>     array(
                'identifier' => 'user_name', //name of the input that holds the identifier used for registration
                'password' => 'user_password', //name of the input that holds the password used for registration
                'email' => 'user_email', //name of the input that holds the email used for registration (only needed if use_email is set to TRUE)
                'primary_key' => 'user_id' //name of the primary key field in the user table
            )
    );
    
    $config['use_database'] = TRUE;
    
    //DB users groups
    $config['use_database_user_groups'] = TRUE;
    
    //Set standard group as user
    $config['user_standard_group'] = 'user';

Both of them didn't seem to work in setting the standard group id field into my "user" table although maybe I have it wrong and they go into another table field ?

Thanks

[eluser]davidbehler[/eluser]
Looks right to me.
What is set for the user group instead of 'user'?

[eluser]opel[/eluser]
Nothing I have set user as the group_id and group level of 1 in the database too?

[eluser]davidbehler[/eluser]
What's the type of the group_id field in your user table?

[eluser]Mat-Moo[/eluser]
Just an idea, but how about taking a parameter in to the register function that can contain othere data for the user to add to the table.

e.g. function register($userdata)
{
...
$_data = array_merge($userdata,$data);
$result = $this->CI->db->insert($member_database_config['name'], $_data);
}

[eluser]Mat-Moo[/eluser]
I'm trying to add some activation in to my code. When a user registers, I now fill out the rest of the record and send an email with an activation code. In my login code, if login was ok, I then check the active field to see if the account was activated. If not another email is sent with details and a warning sent....

However if I have "if($this->auth->is_logged_in())" in my view file - it returns true? I tried the basic

if ($this->auth->user["Activated"]=="FALSE")
{
$who=$this->auth->user["RecordID"];
$this->auth->logout();
$this->user_model->email_validation($who);
}

[eluser]Mat-Moo[/eluser]
Picking up on the last message I posted, I ended up using "$this->session->set_userdata('user',FALSE); // fake logout" to remove the user data, rather than destroy the whole session (which lost other session data I needed).

[eluser]ray73864[/eluser]
Hi Waldmeister,

Love the library, have been using it for a while now, quick question, could you create a function for getting the name of a group? eg: $this->auth->group_name(100) might return 'administrator'?

It isn't essential, i could come up with a normal select statement to grab it, i just thought that others might be able to benefit from such a function too.

[eluser]davidbehler[/eluser]
@Mat-Moo:
I updated the logout function to no longer destroy the session but rather set the user variable to false as you proposed.

@ray73864:
There is no such thing as a group name in the original version of my library, the only infos on a group are its id and its level. I might add that column and a corresponding function to retrieve the name if there is need for such things

[eluser]charlie spider[/eluser]
great lib, i'm enjoying it a lot

for passwords, specifically when using the password generator,
is there any reason why i can't do the following ?

Code:
var $_encryption_methods = array('md5', 'sha', 'sha1');
var $_encryption_elements = array('%salt%', '%password%');
var $_numeric_char_list = array(1,2,3,4,5,6,7,8,9,0,"~","!","@","#","$","%","^","&","*","(",")","_","+","=","-","|","}","{","]","[",";",":","?",">","<","/",".");
var $_alpha_char_list = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");

assuming i escape everything upon input and output.

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB