[sysadmin-bin] Populate the $uid variable on the new_member_form_letter
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Populate the $uid variable on the new_member_form_letter
- Date: Tue, 5 May 2015 00:20:15 +0000 (UTC)
commit 45dbbb797027d673f52d1a2a065356627d866cfa
Author: Andrea Veri <av gnome org>
Date: Tue May 5 02:20:09 2015 +0200
Populate the $uid variable on the new_member_form_letter
membership/foundation-operations.py | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 5843867..68bd120 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -98,9 +98,10 @@ def _get_foundation_fields_from_ldap():
last_renewed_on_attr = _get_attributes_from_ldap(member, 'LastRenewedOn')
mail_attr = _get_attributes_from_ldap(member,'mail')
common_name_attr = _get_attributes_from_ldap(member, 'cn')
+ userid_attr = _get_attributes_from_ldap(member, 'uid')
if last_renewed_on_attr == TODAY and first_added_attr == TODAY:
- send_form_letters(new_member_form_letter, mail_attr, common_name_attr)
+ send_form_letters(new_member_form_letter, mail_attr, common_name_attr, userid_attr)
elif last_renewed_on_attr == TODAY:
send_form_letters(renewal_form_letter, mail_attr, common_name_attr)
else:
@@ -176,7 +177,12 @@ def send_form_letters(form_letter, email, name, *args):
year_month = str(today.year) + '-' + str(today.month)
try:
- if form_letter in [renewal_form_letter, new_member_form_letter]:
+ if form_letter is new_member_form_letter:
+ msg = MIMEText(form_letter.safe_substitute (
+ cn = name,
+ uid = args[0],
+ ), 'plain', 'utf8')
+ elif form_letter is renewal_form_letter:
msg = MIMEText(form_letter.safe_substitute (
cn = name,
), 'plain', 'utf8')
@@ -266,7 +272,7 @@ where your @gnome.org alias is supposed to forward to) and you didn't have a GNO
Account before today, please get in touch with the GNOME Accounts Team at <accounts gnome org>.
Existing GNOME Account owners can reset their password with the following command:
- ssh -l $UID account.gnome.org
+ ssh -l $uid account.gnome.org
And login at:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]