Exposing user details to JS

27254

In our projects we are currently looking at how we can improve our solutions to be more adaptive to users, specifically looking at how we can make changes to improve the experience with say dyslexia or varying forms of colour blindness.

Now the bodge solution to this is to offer the user an option to pick from a dropdown on the site that we inject, however it'd be great if a user could specify in their profile settings these requirements and then in the JS be able to access a User object which contains their basic details along with any of these other settings such as additional requirements they have that we can catch in our code to provide those necessary changes.

So could we get:

  1. Settings in the user profile where they can include additional needs they have
  2. A user object exposed in JS that we can access this detail, along with the other basic details (name, phone, email)
Parents
  • Ryan McDonough, example library attached that can retrieve some user details asynchronously from within Collaborate (without using API)...this is taken from code written 5yrs ago, I had a quick test and it still seems to be working as expected. Should also be IE11 compliant (if required).

    Usage:

    
    	// user ID
    	CommunityExamples.User.getDetails(userID).then(function(details) {
    		console.log(details;
    	});
    	
    	// or encrypted user ID
    	CommunityExamples.User.getDetails(encryptedUserID).then(function(details) {
    		console.log(details;
    	});
    	
    

    Doesn't include any User Group permissions, this you'll have to infer some other way.

    Andrew

Reply
  • Ryan McDonough, example library attached that can retrieve some user details asynchronously from within Collaborate (without using API)...this is taken from code written 5yrs ago, I had a quick test and it still seems to be working as expected. Should also be IE11 compliant (if required).

    Usage:

    
    	// user ID
    	CommunityExamples.User.getDetails(userID).then(function(details) {
    		console.log(details;
    	});
    	
    	// or encrypted user ID
    	CommunityExamples.User.getDetails(encryptedUserID).then(function(details) {
    		console.log(details;
    	});
    	
    

    Doesn't include any User Group permissions, this you'll have to infer some other way.

    Andrew

Children
No Data