Details

      Description

      Under "org.exoplatform.services.organization.idm,
      focus on :

      UserDAOImp.java
      public void persistUserInfo(User user, IdentitySession session) throws Exception
         {
            orgService.flush();
      
            AttributesManager am = session.getAttributesManager();
      
            ArrayList attributes = new ArrayList();
      
            /* ... */
      
            if (user.getPassword() != null)
            {
               if (orgService.getConfiguration().isPasswordAsAttribute())
               {
                  attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
               }
               else
               {
                  try
                  {
                     am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()), user.getPassword());
                  }
                  catch (IdentityException e)
                  {
                     log.info("Cannot update password: " + user.getUserName() + "; ", e);
      
                  }
               }
            }
      
            Attribute[] attrs = new Attribute[attributes.size()];
            attrs = (Attribute[])attributes.toArray(attrs);
      
            try
            {
               am.updateAttributes(user.getUserName(), attrs);
            }
            catch (IdentityException e)
            {
               log.info("Cannot update attributes for user: " + user.getUserName() + "; ", e);
      
            }
      
         } 
      
      

      The method saveUser(User, boolean) throws Exception
      calls
      persistUserInfo(User user, IdentitySession session) throws Exception.

      Whereas, deeper in the code, you can easily notice that exceptions are caught in this level and traced by a log.info:

      • first time in the password level
      • second time when updating all of the attributes.

      Users want to be notified when an error occurs during user registration.
      As well as being aware of the type of the caught exception.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vstorm83 Vu Viet Phuong
                  Reporter:
                  vstorm83 Vu Viet Phuong
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 4 hours Original Estimate - 4 hours
                    4h
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 6 hours
                    6h