AEM 5: How can i get an email address from userid in cq 5.5 | Community
Skip to main content
Community_Admin
Adobe Employee
Adobe Employee
October 16, 2015
Solved

AEM 5: How can i get an email address from userid in cq 5.5

  • October 16, 2015
  • 1 reply
  • 1551 views

How can i get email address from the userid/Authorizable as in CQ 5.5 Profile class is Deprecated

 

Environment CQ 5.5, Linux

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Community_Admin

use com.adobe.granite.security.user.UserProperties instead. e.g.

 

UserProperties u = resourceResolver.adaptTo(UserProperties.class);

String email = u.getProperty(UserProperties.EMAIL);

1 reply

Community_Admin
Adobe Employee
Community_AdminAdobe EmployeeAuthorAccepted solution
Adobe Employee
October 16, 2015

use com.adobe.granite.security.user.UserProperties instead. e.g.

 

UserProperties u = resourceResolver.adaptTo(UserProperties.class);

String email = u.getProperty(UserProperties.EMAIL);