Skip to content

Commit

Permalink
Fixed merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeach47 committed Aug 6, 2018
2 parents 4c88752 + fa2f142 commit dbeb5d8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions openequella-scripting/ScriptedUserProfileJson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Scripted User Profile JSON
Currently, a given user cannot view their own user profile via the API. Until that functionality is implemented in the codebase, the following method can be used:

* Setup a collection with a display template that is scripted with the following:
```
<div id="scripted-user-details">
{
"id": "${user.getID()}",
"username": "${user.getUsername()}",
"firstName": "${user.getFirstName()}",
"lastName": "${user.getLastName()}",
"emailAddress": "${user.getEmail()}"
}
</div>
```
* Contribute an item to that collection. Any user that hits that item summary will have access to JSON of their user's profile.
* Setup a shortcut URL `/s/profile` to point to the item contributed above.

0 comments on commit dbeb5d8

Please sign in to comment.