ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 2 voices, and was last updated by  Vova Soroka 10 months, 2 weeks ago.

  • Creator
    Topic
  • #24141
    stef
    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
  • #24186
    stef
    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

    #24197

    Vova Soroka
    Oro Core

    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)

You must be logged in to reply to this topic.