Welcome Guest, Not a member yet? Register   Sign In
Community Auth - elevate user
#1

[eluser]Mangetsu[/eluser]
Hi. I'm using Community Auth in my CMS and while most of it works out of box ,seams like users can't be elevated by using built in update model method. Problems is that if i change user role, update goes to wrong profile table and transaction fails. Is there any built in way to elevate user or should i make some custom solution?

Code:
// Update profile table record
if( ! empty( $profile_arr ) )
{
$this->db->where('user_id', $the_user)
->update( config_item( $role . '_profiles_table'), $profile_arr );
}
- since there are separate customer and manager tables, if I have customer user that I want to elevate to manager, update will fail since his profile data is in customer_profiles and update goes to manager_profiles.

Thx




Theme © iAndrew 2016 - Forum software by © MyBB