Skip to main content
Community_Admin
Adobe Employee
Adobe Employee
Oct 16, 2015 2:26 AM UTC
Solved

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

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.
Community_Admin
Community_AdminAccepted solution
Adobe Employee
Oct 16, 2015 2:26 AM UTC

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
Oct 16, 2015 2:26 AM UTC

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

 

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

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

Translate