Re: Let LU realise that user data has changed
Lukas Kahwe Smith <[email protected]> Mon, 29 Aug 2005 22:40:17 +0200
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Dennis Michalski wrote:
> Hi all!
>
> I'm sorry for disturbing you lot at your noble work, but I have a small
> problem with integrating LU into my project and I hope you can give me a
> quick hint to solve the problem.
> I hope I can explain it as short as possible:
> I'm using LiveUser 0.15.1 and LU-Admin 0.2.1 as I'm a bit afraid of the
> work needed for migrating to the new version ;)
It will be a bit of work yes.
> I have a page with several user groups. The side navigation contains
> different menus depending on the user group (e.g. user is group A ->
> menu A is rendered, group B -> menu B etc.).
> A logged in user can execute a function which causes his group
> membership to be changed. My problem is that LU somehow does not realise
> this membership change which causes the wrong menus to be rendered (the
> membership is changed without no problems because logging out and in
> again results in the correct menus to be displayed). My first thought
> was to use "logout" and "login" but here's the problem that I use MD5
> encryption and I cannot simply use getProperty('passwd') for the login
> call.
> So the question is if there's a function which i could use to "refresh"
> LU which i have overseen. Maybe there's a little error in reasoning at
> my side aswell. If so, I would really appreciate you to drive me into
> the right direction ;)
Back then we did not have such a method unfortunately.
I think we already had the "cache_perm" option that would reload the
permissions on every request. But that is not an ideal situation.
You could do something somewhat ugly to reload the data in the
permission container though. You could call
$LU->_perm->mapUser($LU->_auth->getProperty('authUserId'),
$LU->_auth->backendArrayIndex);
regards,
Lukas