ssossossosso

Forums

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

This topic contains 4 replies, has 2 voices, and was last updated by Jaimy Jaimy 9 months, 1 week ago.

  • Creator
    Topic
  • #24769
    thinh2010
    thinh2010
    Participant

    Hi there,

    I am working on a student management system. My ideal is each time I create a new student, I want to also create a user related to this student, to login the system.

    So that I think I must work with process.yml. But I cannot found the way to create a new user, because the password needs encrypt.

    Do you guys have any ideal?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #24771
    thinh2010
    thinh2010
    Participant

    Hi,

    I found a solution

    #24772
    Jaimy
    Jaimy
    Participant

    Hi @thinh2010,

    Not entirely sure if this is going to work, but you might create a sample process like this and modify it to your needs. If I’m not mistaken when a user is created through the GUI, the password is being encrypted after submitting. So having the PlainPassword attribute set, might help with your quest of creating a User in a process.

    Hope this helps!

    Kind Regards,

    Jaimy Casteleijn

    #24773
    thinh2010
    thinh2010
    Participant

    @Hi Jaimy,

    Thanks for your reply. I already found a way to do it, and posted above.

    Your code I think will not work because if you just set the plainPassword, there is exception said that you need password to create an User (I already tried it before and got this error)

    So that you need call the updateUser function in UserManager via @call_service_method to generate encrypted password from plainPassword.

    Regards,

    Thinh

    #24774
    Jaimy
    Jaimy
    Participant

    Hi @thinh2010,

    Good call on the call_service_method, that will do the trick :). It’s nice of you to post the solution you’ve found, since there might be others who’re dealing with some of the same issues as you were having with the creation of an User via a different way than the GUI. This will might help others in their development with OroCRM

    Kind Regards,

    Jaimy Casteleijn

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

You must be logged in to reply to this topic.