OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Installation/Technical Issues or Problems Create user via api fails on null password field

This topic contains 2 replies, has 2 voices, and was last updated by  Vova Soroka 7 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #27469

    stef
    Participant

    Trying to create user via api, I have hit this roadblock.

    The error stems from the password field. Not having the password field in the attributes array throws this exception:

    When called with password in attribute array, we get this tidbit:

    I have tried the passwordPlain attribute, inspired by RestUsersTest::testCreateUser(), but this also throws the ‘extra field’ error.

    It seems the field cannot be null, yet the api constraint disallows the password attribute.

    Is there a workaround for this?

    The request payload I send is as follow:

    Thanks!

    Stef


    Dream, in a pragmatic way.
    — Aldous Huxley

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #27470

    stef
    Participant

    I have resolved this by implementing a listener on doctrine. On account creation if account is not active and password is null, we add a dummy password so account creation can be processed.


    Dream, in a pragmatic way.
    — Aldous Huxley

    #27471

    Vova Soroka
    Participant

    Hello @stef,

    Unfortunately there is a bug in API for creation of User entity in the currently released version of the platform.
    We have already fixed it in the master branch and the fix will be released in the platform 2.0.

    Thank you for the feedback.

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top