We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Specific code question regarding UserAccountDAO.java

in the UserAccountDAO class in getEntityFromHashMap you have code that excludes loading roles for users with a period in the username.. is there a reason for this? I would be using email addresses for usernames

if (!userName.contains(".")){
ArrayList userRoleBeans = (ArrayList) this.findAllRolesByUserName(eb.getName());


  • toskriptoskrip Posts: 279 ✭✭✭

    I think this was introduced in order to support automatic user account creation for patients reporting their outcomes via OC Participate. In this case such user account is only relevant for data submission and cannot be used for login, so it does not have any particular role associated.

    the username for such automated patient account was constructed as:
    studyBean.getOid() + "." + studySubjectBean.getOid()

    in newest version of OC now there is a web service which Participate use to create the user accounts for patients, however the user name is still provided in a fashion I described above.

    hope it helps

  • gpinkhamgpinkham Posts: 37
    Thanks Tomas.. for my use I removed that code.. was worried it might cause another unknown issue.. good to see it won't.. (I connected openclinica community to my oauth provider I wrote.. and for that I use email for username..)

    thanks for the quick response!
Sign In or Register to comment.