활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
I am using the below code to create users under /home/users/myproject
Session session = request.getResourceResolver().adaptTo(Session.class);
//Session session2 = request.get
JackrabbitSession jsession= (JackrabbitSession) session;
UserManager usermanager;
final String userName = "testincdscdcg2ss2dcd3";
try {
usermanager = (UserManager) js.getUserManager();
User user = usermanager.createUser("Mytestissng2dcddcdxsx", "dcdMyTestingsvdfcdv2", new Principal() {
public String getName() {
return userName;
}
}, "/home/users/myproject");
jsession.save();
But it is creating users with strange node names, Attached is the screen shot. Even if i create a user from AEM useradmin UI it creates users with similar strange node names.
Just wondering how does geometrixx has user nodes with proper names under /home/users/geometrixx.
Also once the new user node is created under my project path i.e /home/users/myproject/ppXn-NUF084WwcxjAD9 i need to add a profile node and add some properties using below code
String NodePath = userManager.getAuthorizable("Mytestissng2dcddcdxsx ").getPath()
Node node = session.getNode(NodePath );
/* Add profile node and add properies to profile node like profileNode.setProperty("timeNow", System.currentTimeMillis()); */
but userManager.getAuthorizable("Mytestissng2dcddcdxsx ").getPath(); is saying The method getPath() is undefined for the type Authorizable. Is there a way i can get the node name from usermanager api by passing the username of the user as a parameter ?
As i don't have control over the node name that is getting created i am not able frame a path like " /home/users/myproject/+nodenameoftheuser " and then test if one such node exists and get that node using the path Session.getNode( " /home/users/myproject/+nodenameoftheuser ")
Any help is appreciated.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
It is the actual behavior of AEM in its latest versions. So you will have to use queries to get the path
조회 수
답글
좋아요 수
Hi,
please see an earlier thread on how AEM 6.1 now creates the path for users:
Regards,
Opkar
조회 수
답글
좋아요 수
It is the actual behavior of AEM in its latest versions. So you will have to use queries to get the path
조회 수
답글
좋아요 수