Closed singleseeker closed 10 years ago
You could dynamically change the config settings using CIs config library.
-Ben Edmunds
On Oct 29, 2013, at 8:36 PM, SingleSeeker notifications@github.com wrote:
i use ion-auth for a long time. thanks for this perfect code.
here is a question.
i hope the manage system and front user system use different tables.use groups is a good way to let manager or user have different laval, but i really do not want to make them in a same table.
if there is a way to load different configs and put different identify in session in order that separate manage system and user system.
— Reply to this email directly or view it on GitHubhttps://github.com/benedmunds/CodeIgniter-Ion-Auth/issues/516 .
ok, got it. thank u.
even I load a different config.
i also need to change the code , isn`t right?
it will not allowed me to make both front user and mange user login together if i do not change the following code. what i am thinking, why not add a pre-fix(from config file) for the following code.
$session_data = array(
'identity' => $user->{$this->identity_column},
'username' => $user->username,
'email' => $user->email,
'user_id' => $user->id, //everyone likes to overwrite id so we'll use user_id
'old_last_login' => $user->last_login
);
becomes
$session_data = array(
$pre_fix . 'identity' => $user->{$this->identity_column},
$pre_fix . 'username' => $user->username,
$pre_fix . 'email' => $user->email,
$pre_fix . 'user_id' => $user->id, //everyone likes to overwrite id so we'll use user_id
$pre_fix . 'old_last_login' => $user->last_login
);
what do u think?
+1
:)
So you want a user to be a manager and a normal user at once?
This really sounds like something you should just use groups for..
sometimes we do not want the manager and normal user were stored in a same table.
I dont really think this is a good idea so I'm going to close this. I get that you want it and I'm glad you found a way to make it work but I think it would just be confusing to the majority of users of the library.
I'll make sure to point people to this issue if anyone else needs this in the future. Thanks.
i use ion-auth for a long time. thanks for this perfect code.
here is a question.
i hope the manage system and front user system use different tables.use groups is a good way to let manager or user have different laval, but i really do not want to make them in a same table.
if there is a way to load different configs and put different identify in session in order that separate manage system and user system.