Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global class PortalPlugin extends Auth.ConnectedAppPlugin {
- // Return a user’s permission set assignments
- global override Map<String,String> customAttributes (Id userId, Id connectedAppId, Map<String,String> formulaDefinedAttributes, Auth.InvocationContext context) {
- User userToUpd = [Select Id, TPP_TokenPT__c from User where id = :userId][0];
- if(String.isNotBlank(userToUpd.TPP_TokenPT__c))
- {
- userToUpd.TPP_TokenPT__c = '';
- update userToUpd;
- }
- System.debug(formulaDefinedAttributes);
- return formulaDefinedAttributes;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement