+ if 'enabled' in person_fields:
+ To = [("%s %s" % (person['first_name'], person['last_name']), person['email'])]
+ Cc = []
+ if person['enabled']:
+ Subject = "PlanetLab account enabled"
+ Body = "Your PlanetLab account has been enabled. You should now be allowd to access you account"
+ else:
+ Subject = "PlanetLab account disabled"
+ Body = "Your PlanetLab account has been disabled. Please contact your PI or PlanetLab support for more information"
+ sendmail(self.api, To = To, Cc = Cc, Subject = Subject, Body = Body)
+
+
+ # Logging variables
+ self.event_objects = {'Person': [person['person_id']]}
+
+ # Redact password
+ if 'password' in person_fields:
+ person_fields['password'] = "Removed by API"
+ self.message = 'Person %d updated: %s.' % \
+ (person['person_id'], person_fields.keys())
+ if 'enabled' in person_fields:
+ self.message += ' Person enabled'
+