I'm learning through your demo and implementing it on my site, and I guess I found an issue at line 336 of demo_auth_model.php: the primary key should be the correspondent upro_uacc_fk of the $user_id, and not the $user_id itself.
In my case I just used my own model in order to retrieve the correspondet pk and it works fine. Anyway, congratulations for the excellent work.