SHARE
TWEET

Untitled

a guest Aug 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top