| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 22 | def on_contact_modified(contact, event): |
||
| 23 | """Event handler when a Contact was modified |
||
| 24 | """ |
||
| 25 | user = contact.getUser() |
||
| 26 | if not user: |
||
| 27 | # no user linked, nothing to do |
||
| 28 | return |
||
| 29 | # always update the email and fullname |
||
| 30 | email = contact.getEmailAddress() |
||
| 31 | fullname = contact.getFullname() |
||
| 32 | user.setProperties(email=email, fullname=fullname) |
||
| 33 |