Hi mohit
If you posted the whole code the problem is that you do not save your changes.
Changing the value of an object does change only the "in memory"
representation of that object, but nothing on the database. You need
to save the corresponding document to make changes to the database and
make your changes permanent.
Hope this helps
Edo
On Sat, Feb 25, 2012 at 2:38 PM, mohit gupta <motgupta(a)gmail.com> wrote:
Hi Folks,
Need help on below query. Thanks in advance.
---------- Forwarded message ----------
From: mohit gupta <motgupta(a)gmail.com>
Date: Fri, Feb 24, 2012 at 9:57 AM
Subject: How to set the max unsuccessful login attempts to some numbaer say
4?
To: XWiki Users <users(a)xwiki.org>
I had put this question earlier too but knowing that its not configurable
in xwiki as of now as OOB feature. So started implementing this feature
myself with
some modification in code. I did modifications in checkPassword method of
XWikiAuthServiceImpl. Basically i want to put the *passwordLockCount *as
name and *1* as value
in xwikiintegers table(when user tries any unsuccessful login attempt). For
this i used the api i.e userObject.setIntValue("passwordLockCount", 1)
where userObject
is of type BaseObject. But it does not put the value in xwikiintegers table
rather it put in cache. Please recommend me the right API the to put this
number
property in xwikiintegers table?
*i also tried *
NumberProperty passwordLockCount = new IntegerProperty();
passwordLockCount.setName("passwordLockCount");
passwordLockCount.setValue(1);
userObject.addField("passwordLockCount", passwordLockCount);
But it also does not put the property in database?
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users