from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
Person.fields['verification_expires']
]
returns = Parameter(int, '1 if verification_key is valid')
def call(self, auth, person_id_or_email, verification_key = None, verification_expires = None):
Person.fields['verification_expires']
]
returns = Parameter(int, '1 if verification_key is valid')
def call(self, auth, person_id_or_email, verification_key = None, verification_expires = None):
# Get the primary site name
person_sites = Sites(self.api, person['site_ids'])
# Get the primary site name
person_sites = Sites(self.api, person['site_ids'])
- (verification_key is not None and person['verification_expires'] and \
- person['verification_expires'] < time.time()):
- # Only allow one verification at a time
+ (verification_key is not None and person['verification_expires'] and \
+ person['verification_expires'] < time.time()):
+ # Only allow one verification at a time
for site in person_sites:
person_ids.update(site['person_ids'])
persons = Persons(self.api, person_ids)
for site in person_sites:
person_ids.update(site['person_ids'])
persons = Persons(self.api, person_ids)
# Send e-mail to PI(s) and copy the user
To = [("%s %s" % (pi['first_name'], pi['last_name']), pi['email']) for pi in pis]
# Send e-mail to PI(s) and copy the user
To = [("%s %s" % (pi['first_name'], pi['last_name']), pi['email']) for pi in pis]
'PLC_WWW_SSL_PORT': self.api.config.PLC_WWW_SSL_PORT,
'person_id': person['person_id'],
# Will be used in a URL, so must quote appropriately
'PLC_WWW_SSL_PORT': self.api.config.PLC_WWW_SSL_PORT,
'person_id': person['person_id'],
# Will be used in a URL, so must quote appropriately
'site_name': site_name,
'first_name': person['first_name'],
'last_name': person['last_name'],
'site_name': site_name,
'first_name': person['first_name'],
'last_name': person['last_name'],
Subject = message['subject'] % params,
Body = message['template'] % params)
else:
Subject = message['subject'] % params,
Body = message['template'] % params)
else: