Sign in to Community
Sign in to view all badges
I am trying to use Sling @TypeHint to set profile/age = 30, which age is a Long data type.
So this is what I did in curl cmd
curl -u admin:admin -FcreateUser= -FauthorizableId=testuser -Frep:password=testuser -Fprofile/age@TypeHint=Long -Fprofile/age=30 -FintermediatePath="/home/users/test/" http://localhost:4501/libs/granite/security/post/authorizables
But this is not working. Can someone tell me how to fix this?
Can you please try below and see if it helps.
curl -u admin:admin -FcreateUser= -FauthorizableId=sample -Frep:password=sample http://localhost:4502/libs/granite/security/post/authorizables
curl -u admin:admin -Fprofile/age=25 http://localhost:4502/home/users/s/sample.rw.html
This is exactly what I wrote in the first thread. And it does not work.
This command puts age (String) = 30 and age@TypeHint (String) = "Long" in the user profile.
I would like profile/age to be a Long type "30" instead of a String typed "30" in AEM when I create the user using curl command. How can I do this?
I know @TypeHint is a way, but not sure how to use when I call create user in http://localhost:4501/libs/granite/security/post/authorizables
Just try this separately:-
Create a new User
curl -u admin:admin -FcreateUser= -FauthorizableId=hashim -Frep:password=hashim http://localhost:4502/libs/granite/security/post/authorizables
Add a Property to an existing User
curl -u admin:admin -Fprofile/age=25 http://localhost:4502/home/users/h/hashim.rw.html
Create a User with a profile
curl -u admin:admin -FcreateUser=testuser -FauthorizableId=hashimkhan -Frep:password=hashimkhan -Fprofile/gender=male http://localhost:4502/libs/granite/security/post/authorizables