Skip to content

Commit

Permalink
identify actors by name instead of ID
Browse files Browse the repository at this point in the history
  • Loading branch information
usernamenumber committed Oct 10, 2016
1 parent 9a92caa commit f286c7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/pods/application/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,14 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
return new Ember.RSVP.Promise(
this.fetchUser.bind(this)
).then((user) => {
var useridKey = "http://tunapanda.org/xapi/extensions/userid";
setIfUnset(statement_data.context.extensions, useridKey, user.get('userid'));
var regnameKey = "http://tunapanda.org/xapi/extensions/regname";
setIfUnset(statement_data.context.extensions, regnameKey, user.get('username'));
setIfUnset(statement_data, "actor", {
"objectType":"Agent",
"account":{
"name": user.get('id'),
"name": user.get('username'),
"homePage": this.getXapiUserHomepage()
}
});
Expand Down

0 comments on commit f286c7e

Please sign in to comment.