AnsweredAssumed Answered

Hot to get user properties (email address)

Question asked by michaelp on Jun 17, 2014
Latest reply on Jun 17, 2014 by michaelp
Hi,

How can I get the user's email address? First I need the username on the current user which starts an action.

String user = authenticationService.getCurrentUserName();


but I only get

Invalid property 'authenticationService' of bean class […]: Bean property 'authenticationService' is not writable or has an invalid setter method. Did you mean 'authentificationService'?


service-context.xml

<bean id="send-as-email" class="…" parent="action-executer">
        <property name="nodeService">
            <ref bean="NodeService"/>
        </property>
      <property name="contentService">
         <ref bean="ContentService"/>
      </property>
      <property name="personService">
         <ref bean="PersonService"/>
      </property>
      <property name="authenticationService">
         <ref bean="AuthenticationService"/>
      </property>


Can someone help me or give an example on how to get the current user's email address? I googled many times but found nothing I can use in my case.

Thanks in advance

Outcomes