[xwiki-dev] CreateUserFromLDAP in LDAPAuthServiceImpl

Ludovic Dubost ludovic at xwiki.com
Wed Nov 8 23:54:17 CET 2006


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 xwiki-dev at objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?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





More information about the devs mailing list