CreateUserFromLDAP in LDAPAuthServiceImpl
Hi, In the LdapAuthServiceImpl , as far as I understand it, everytime a user is authentified, the method CreateUserFromLDAP is called, wich in turn creates a user page in the wiki. The creation is done regardless of wether te page already exists or not in the wiki, increasing its version number upon every call to authenticate (which is called quite often). I tried to do use the doc.isNew() method to try to avoid creating a user page when it already exists, but the isNew appear to always return false after the doc creation using this line: XWikiDocument doc = context.getWiki().getDocument(fullwikiname, context); Is that correct? Is there a way to avoid updating the user's document upon every authentification? Thanks, Philippe Legrain
Well we could check that the fields have not changed and not save it in this case. Checking isNew() is not necessarly a good idea (it should work though) because some data might have changed. A patch is welcome. Ludovic Philippe Legrain a écrit :
Hi,
In the LdapAuthServiceImpl , as far as I understand it, everytime a user is authentified, the method CreateUserFromLDAP is called, wich in turn creates a user page in the wiki. The creation is done regardless of wether te page already exists or not in the wiki, increasing its version number upon every call to authenticate (which is called quite often).
I tried to do use the doc.isNew() method to try to avoid creating a user page when it already exists, but the isNew appear to always return false after the doc creation using this line: XWikiDocument doc = context.getWiki ().getDocument(fullwikiname, context);
Is that correct? Is there a way to avoid updating the user's document upon every authentification?
Thanks,
Philippe Legrain ------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (2)
-
Ludovic Dubost -
Philippe Legrain