Quantcast
Channel: Adobe AEM CQ tips » AEM/CQ5
Viewing all articles
Browse latest Browse all 8

Activate Adobe AEM/CQ5 user programmatically

$
0
0

Problem

I created AEM/CQ5 user but I need to disable/block his account until he validates his e-mail and enable/unblock it after that.

Solution

You can lock the account like this

 user.disable("Waiting for moderation!");

And unlock/enable it just by calling the User#disable() and passing null as the reason to disable/lock the account. Like this

user.disable(null);

Viewing all articles
Browse latest Browse all 8

Trending Articles