Reputation: 2228
I have the following line of code
String currentUser = ((WorkflowContext)transientVars.get("context")).getCaller();
Then I proceed to call
(comment != "") && commentManager.create(parent, currentUser, comment, true);
My question is, that CommentManager
now requires the applicationUser
object instead of a String
. So how do I get the currentUser
that would return the applicationUser
.
Upvotes: 0
Views: 837
Reputation: 38734
ComponentAccessor.userManager.getUserByName(userName)
will give you the ApplicationUser
for a username string.
Upvotes: 1