Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. global class PortalPlugin extends Auth.ConnectedAppPlugin {
  2.  
  3. // Return a user’s permission set assignments
  4. global override Map<String,String> customAttributes (Id userId, Id connectedAppId, Map<String,String> formulaDefinedAttributes, Auth.InvocationContext context) {
  5.  
  6. User userToUpd = [Select Id, TPP_TokenPT__c from User where id = :userId][0];
  7. if(String.isNotBlank(userToUpd.TPP_TokenPT__c))
  8. {
  9. userToUpd.TPP_TokenPT__c = '';
  10. update userToUpd;
  11. }
  12.  
  13. System.debug(formulaDefinedAttributes);
  14.  
  15. return formulaDefinedAttributes;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement