3 # searches and displays any local orphan account (not attached to a site)
4 # remote accounts with identical emails are displayed as well
9 return [p for p in GetPersons({'peer_id':None,'-SORT':'date_created'}) if not p['site_ids'] ]
11 def list_person (margin,p):
12 print margin,'%6d'%p[person_id], time.asctime(time.gmtime(p['date_created'])),
13 if not p['peer_id']: print 'LOCAL',
14 else: print 'pr=',p['peer_id'],
17 def get_related(email):
18 return GetPersons ({'email':email,'~peer_id':None})
22 orphans = get_orphans()
23 print 'Found',len(orphans),'orphan accounts'
26 list_person ("%3d"%index++,p)
27 for related in get_related(p['email']):
28 list_person("---",related)
30 if __name__ == '__main__':