On 13/04/2012 14:09, ernst Developer wrote:
Hi Francesco,

Thanks for the really fast reply.

In the UserMod object, the password property is null. But still the password seems to be updated.

Code used:

        UserMod userMod = new UserMod();
        userMod.setId(userId);
Set<AttributeMod> attributesToBeUpdated = new HashSet<AttributeMod>();
        AttributeMod ourProperty = new AttributeMod();
ourProperty.setSchema(SyncopeSchema.securityQuestionsAnswered.name <http://SyncopeSchema.securityQuestionsAnswered.name>());
ourProperty.setValuesToBeAdded(Arrays.asList(new String[]{isoDateTime}));
        attributesToBeUpdated.add(ourProperty);
        userMod.setAttributesToBeUpdated(attributesToBeUpdated);
        this.syncopeClient.update(userMod);

UserTO modifiedUser = restTemplate.postForObject(url, user, UserTO.class);

Shouldn't this be

UserTO modifiedUser = restTemplate.postForObject(url, userMod, UserTO.class);

?

That is the code that is executed. Are we doing something wrong? In a previous version (0.5) it was working.
Now with 0.7.1 it does not anymore.

Kind regards,
Ernst

2012/4/13 Francesco Chicchiriccò <[email protected] <mailto:[email protected]>>

    On 13/04/2012 13:55, ernst Developer wrote:

        Hi,

        I have a question about the way the update of a user is
        implemented.

        It looks like that when we use the restful request for
        updating only one attribute, we notice that the password is
        reset is well.
        I create a UserMod object that is completely empty except for
        the user id and an attribute in the attributesToBeUpdated set.

        When I studied the code of syncope core, I thought that this
        the way it is implemented in the update method.
        Is that true, or am I missing something here?


    If you don't want the password to be reset, don't set any password
    in the UserMod object.


        Hope my question is clear, and hope to get an answer soon.


    Is this fast enough?

--
Francesco Chicchiriccò

Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to