Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.ast_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.ast_ES.ISO-8859-1.xml,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.ast_ES.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.6 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.ast_ES.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.7 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="ast_ES" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="ast_ES" charset="ISO-8859-1"> <msg key="Check_Your_Inbox">Mira'l Buz�n</msg> <msg key="Children">Ne�os</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.da_DK.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.da_DK.ISO-8859-1.xml,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.da_DK.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.11 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.da_DK.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.12 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="da_DK" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="da_DK" charset="ISO-8859-1"> <msg key="About_You">Omkring dig</msg> <msg key="again">igen</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.9 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.10 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="de_DE" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="de_DE" charset="ISO-8859-1"> <msg key="About_You">Ausgew�hlte Benutzerinformation</msg> <msg key="again">wieder</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.el_GR.ISO-8859-7.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.el_GR.ISO-8859-7.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.el_GR.ISO-8859-7.xml 12 Sep 2003 08:21:56 -0000 1.8 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.el_GR.ISO-8859-7.xml 16 Sep 2003 13:08:38 -0000 1.9 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="el_GR" charset="ISO-8859-7"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="el_GR" charset="ISO-8859-7"> <msg key="About_You">�����������</msg> <msg key="again">����</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 12 Sep 2003 12:50:40 -0000 1.21 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.22 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="en_US" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="en_US" charset="ISO-8859-1"> <msg key="About_You">About You</msg> <msg key="again">again</msg> @@ -20,6 +20,7 @@ <msg key="Customize_Question">Customize Question</msg> <msg key="Direct_Permissions">Direct Permissions</msg> <msg key="edit_your_alerts">edit your alerts</msg> + <msg key="Email">Email</msg> <msg key="email_address">email address:</msg> <msg key="Email_Confirmation">Email Confirmation</msg> <msg key="Email_not_Requested">Email not Requested</msg> @@ -30,8 +31,8 @@ <msg key="First_names">First names</msg> <msg key="Forgotten_password_body">Here is your new login information: -Username: %username% -Password: %password% +%account_id_label%: %account_id% +%password_label%: %password% Please visit the following link to change your password: @@ -208,11 +209,30 @@ <msg key="on">on</msg> <msg key="or">or</msg> <msg key="Password">Password</msg> + <msg key="Password_changed_body">Your login information on %system_name%: + +%account_id_label%: %account_id% + +Your password for this account has recently been changed. You don't +need to do anything, this message is simply a notification to protect +the security of your account. + +--------------- + +You can always change your password by doing the following: + +1. Log in to %system_name% + +2. Click on the "%pvt_home_name%" link + +3. Choose "%password_update_link_text%"</msg> + <msg key="Password_changed_subject">Password changed</msg> <msg key="Permissions">Permissions</msg> <msg key="Permissions_for_name">Permissions for %name%</msg> <msg key="personal_URL">personal URL:</msg> <msg key="Question">Question:</msg> <msg key="question">question:</msg> + <msg key="Recover_Password">Recover Password</msg> <msg key="Register">Register</msg> <msg key="Revoke_Checked">Revoke Checked</msg> <msg key="Screen_name">Screen name</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.es_ES.ISO-8859-1.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.es_ES.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.9 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.es_ES.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.10 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="es_ES" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="es_ES" charset="ISO-8859-1"> <msg key="About_You">Mi informaci�n</msg> <msg key="again">de nuevo</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.fi_FI.utf-8.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.fi_FI.utf-8.xml,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.fi_FI.utf-8.xml 12 Sep 2003 08:21:56 -0000 1.2 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.fi_FI.utf-8.xml 16 Sep 2003 13:08:38 -0000 1.3 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="fi_FI" charset="utf-8"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="fi_FI" charset="utf-8"> <msg key="About_You">Tietoja sinusta</msg> <msg key="again">uudelleen</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.fr_FR.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.fr_FR.ISO-8859-1.xml,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.fr_FR.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.7 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.fr_FR.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.8 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="fr_FR" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="fr_FR" charset="ISO-8859-1"> <msg key="About_You">A propos de vous</msg> <msg key="again">encore</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.it_IT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.it_IT.ISO-8859-1.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.it_IT.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.8 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.it_IT.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.9 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="it_IT" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="it_IT" charset="ISO-8859-1"> <msg key="Confirm">Conferma Password:</msg> <msg key="Current_Password">Password Attuale:</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.ja_JP.Shift_JIS.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.ja_JP.Shift_JIS.xml,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.ja_JP.Shift_JIS.xml 12 Sep 2003 08:21:56 -0000 1.6 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.ja_JP.Shift_JIS.xml 16 Sep 2003 13:08:38 -0000 1.7 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="ja_JP" charset="Shift_JIS"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="ja_JP" charset="Shift_JIS"> <msg key="About_You">���Ȃ��ɂ���</msg> <msg key="again">������x</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.ko_KR.EUC-KR.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.ko_KR.EUC-KR.xml,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.ko_KR.EUC-KR.xml 12 Sep 2003 08:21:56 -0000 1.6 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.ko_KR.EUC-KR.xml 16 Sep 2003 13:08:38 -0000 1.7 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="ko_KR" charset="EUC-KR"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="ko_KR" charset="EUC-KR"> <msg key="About_You">��ſ� ����</msg> <msg key="again">�ٽ�</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.ms_my.US-ASCII.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.ms_my.US-ASCII.xml,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.ms_my.US-ASCII.xml 12 Sep 2003 08:21:56 -0000 1.5 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.ms_my.US-ASCII.xml 16 Sep 2003 13:08:38 -0000 1.6 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="ms_my" charset="US-ASCII"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="ms_my" charset="US-ASCII"> <msg key="About_You">Tentang Anda</msg> <msg key="Answer">Jawapan:</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.nl_NL.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.nl_NL.ISO-8859-1.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.nl_NL.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.9 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.nl_NL.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.10 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="nl_NL" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="nl_NL" charset="ISO-8859-1"> <msg key="About_You">Over u</msg> <msg key="again">opnieuw</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.no_NO.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.no_NO.ISO-8859-1.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.no_NO.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.8 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.no_NO.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.9 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="no_NO" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="no_NO" charset="ISO-8859-1"> <msg key="About_You">Om deg</msg> <msg key="again">igjen</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.pl_PL.ISO-8859-2.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.pl_PL.ISO-8859-2.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.pl_PL.ISO-8859-2.xml 12 Sep 2003 08:21:56 -0000 1.9 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.pl_PL.ISO-8859-2.xml 16 Sep 2003 13:08:38 -0000 1.10 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="pl_PL" charset="ISO-8859-2"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="pl_PL" charset="ISO-8859-2"> <msg key="About_You">O Tobie</msg> <msg key="again">ponownie</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.ru_RU.windows-1251.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.ru_RU.windows-1251.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.ru_RU.windows-1251.xml 12 Sep 2003 08:21:56 -0000 1.8 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.ru_RU.windows-1251.xml 16 Sep 2003 13:08:38 -0000 1.9 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="ru_RU" charset="windows-1251"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="ru_RU" charset="windows-1251"> <msg key="About_You">� ���</msg> <msg key="again">�����</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.sh_HR.ISO-8859-5.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.sh_HR.ISO-8859-5.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.sh_HR.ISO-8859-5.xml 12 Sep 2003 08:21:56 -0000 1.8 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.sh_HR.ISO-8859-5.xml 16 Sep 2003 13:08:38 -0000 1.9 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="sh_HR" charset="ISO-8859-5"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="sh_HR" charset="ISO-8859-5"> <msg key="About_You">O tebi</msg> <msg key="again">ponovo</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.sv_SE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.sv_SE.ISO-8859-1.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.sv_SE.ISO-8859-1.xml 12 Sep 2003 08:21:56 -0000 1.9 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.sv_SE.ISO-8859-1.xml 16 Sep 2003 13:08:38 -0000 1.10 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="sv_SE" charset="ISO-8859-1"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="sv_SE" charset="ISO-8859-1"> <msg key="About_You">Om dig</msg> <msg key="again">igen</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.tr_TR.ISO-8859-9.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.tr_TR.ISO-8859-9.xml,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.tr_TR.ISO-8859-9.xml 12 Sep 2003 08:21:56 -0000 1.5 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.tr_TR.ISO-8859-9.xml 16 Sep 2003 13:08:38 -0000 1.6 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="tr_TR" charset="ISO-8859-9"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="tr_TR" charset="ISO-8859-9"> <msg key="About_You">Sizin Hakk�n�zda</msg> <msg key="again">tekrar</msg> Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.zh_TW.Big5.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/Attic/acs-subsite.zh_TW.Big5.xml,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.zh_TW.Big5.xml 12 Sep 2003 08:21:56 -0000 1.5 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.zh_TW.Big5.xml 16 Sep 2003 13:08:38 -0000 1.6 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<message_catalog package_key="acs-subsite" package_version="5.0d2" locale="zh_TW" charset="Big5"> +<message_catalog package_key="acs-subsite" package_version="5.0d3" locale="zh_TW" charset="Big5"> <msg key="About_You">����A</msg> <msg key="again">�A�@��</msg> Index: openacs-4/packages/acs-subsite/lib/login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/login.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/lib/login.tcl 12 Sep 2003 12:34:21 -0000 1.7 +++ openacs-4/packages/acs-subsite/lib/login.tcl 16 Sep 2003 13:08:38 -0000 1.8 @@ -6,6 +6,7 @@ # Optional: # authority_id # username +# email # if { ![exists_and_not_null package_id] } { @@ -16,6 +17,10 @@ set username {} } +if { ![info exists email] } { + set email {} +} + # Persistent login # The logic is: # 1. Allowed if allowed both site-wide (on acs-kernel) and on the subsite @@ -53,11 +58,11 @@ set authority_id [lindex [lindex $authority_options 0] 1] } -set forgotten_pwd_url [auth::password::get_forgotten_url -authority_id $authority_id -username $username] +set forgotten_pwd_url [auth::password::get_forgotten_url -authority_id $authority_id -username $username -email $email] set register_url "[subsite::get_element -element url]register/user-new" if { [string equal $authority_id [auth::get_register_authority]] } { - set register_url [export_vars -no_empty -base $register_url { username }] + set register_url [export_vars -no_empty -base $register_url { username email }] } ad_form -name login -html { style "margin: 0px;" } -show_required_p 0 -edit_buttons { { "Login" ok } } -action "/register/" -form { @@ -67,21 +72,27 @@ {hash:text(hidden)} } -if { [llength $authority_options] > 1 } { - ad_form -extend -name login -form { - {authority_id:integer(select) - {label "Authority"} - {options $authority_options} - } - } -} - +set username_widget text if { [parameter::get -parameter UsePasswordWidgetForUsername -package_id [ad_acs_kernel_id]] } { set username_widget password +} + +if { [auth::UseEmailForLoginP] } { + ad_form -extend -name login -form [list [list email:text($username_widget) [list label "Email"]]] + set user_id_widget_name email } else { - set username_widget text + if { [llength $authority_options] > 1 } { + ad_form -extend -name login -form { + {authority_id:integer(select) + {label "Authority"} + {options $authority_options} + } + } + } + + ad_form -extend -name login -form [list [list username:text($username_widget) [list label "Username"]]] + set user_id_widget_name username } -ad_form -extend -name login -form [list [list username:text($username_widget) [list label "Username"]]] ad_form -extend -name login -form { {password:text(password) @@ -113,6 +124,7 @@ array set auth_info [auth::authenticate \ -authority_id $authority_id \ + -email $email \ -username $username \ -password $password \ -persistent=[expr $allow_persistent_login_p && [template::util::is_true $persistent_p]]] @@ -127,7 +139,7 @@ break } default { - form set_error login username $auth_info(auth_message) + form set_error login $user_id_widget_name $auth_info(auth_message) break } } Index: openacs-4/packages/acs-subsite/lib/user-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-info.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/lib/user-info.tcl 12 Sep 2003 13:25:19 -0000 1.1 +++ openacs-4/packages/acs-subsite/lib/user-info.tcl 16 Sep 2003 13:08:38 -0000 1.2 @@ -22,9 +22,17 @@ ad_form -name user_info -cancel_url $return_url -action $action_url -mode display -form { {return_url:text(hidden),optional {value $return_url}} - {username:text(inform) - {label "Username"} +} + +if { ![auth::UseEmailForLoginP] } { + ad_form -extend -name user_info -form { + {username:text(inform) + {label "Username"} + } } +} + +ad_form -extend -name user_info -form { {first_names:text {label "First names"} {html {size 50}} Index: openacs-4/packages/acs-subsite/www/register/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/index.adp,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-subsite/www/register/index.adp 4 Sep 2003 16:35:04 -0000 1.12 +++ openacs-4/packages/acs-subsite/www/register/index.adp 16 Sep 2003 13:08:38 -0000 1.13 @@ -1,6 +1,6 @@ <master> <property name="title">#acs-subsite.Log_In#</property> - <property name="focus">login.username</property> + <property name="focus">@focus@</property> <property name="context">{#acs-subsite.Log_In#}</property> -<include src="/packages/acs-subsite/lib/login" return_url="@return_url;noquote@" no_frame_p="1" authority_id="@authority_id@" username="@username;noquote@"> +<include src="/packages/acs-subsite/lib/login" return_url="@return_url;noquote@" no_frame_p="1" authority_id="@authority_id@" username="@username;noquote@" email="@email;noquote@"> Index: openacs-4/packages/acs-subsite/www/register/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/register/index.tcl 3 Sep 2003 09:51:58 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/register/index.tcl 16 Sep 2003 13:08:38 -0000 1.8 @@ -4,6 +4,8 @@ } { {authority_id ""} {username ""} + {email ""} {return_url ""} } +set focus [auth::get_login_focus] Index: openacs-4/packages/acs-subsite/www/register/recover-password.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/recover-password.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/register/recover-password.tcl 4 Sep 2003 16:35:04 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/register/recover-password.tcl 16 Sep 2003 13:08:38 -0000 1.8 @@ -7,6 +7,7 @@ } { {authority_id:integer ""} {username ""} + {email ""} } set page_title [_ acs-subsite.Recover_Password] @@ -21,35 +22,51 @@ ad_form -name recover -edit_buttons [list [list [_ acs-kernel.common_continue] ok]] -form { {dummy:text(hidden),optional} } -if { [llength $authority_options] > 1 } { - ad_form -extend -name recover -form { - {authority_id:integer(select) - {label {[_ acs-kernel.authentication_authority]}} - {options $authority_options} + + +set username_widget text +if { [parameter::get -parameter UsePasswordWidgetForUsername -package_id [ad_acs_kernel_id]] } { + set username_widget password +} + +if { [auth::UseEmailForLoginP] } { + ad_form -extend -name recover -form [list [list email:text($username_widget) [list label "Email"]]] + set user_id_widget_name email +} else { + if { [llength $authority_options] > 1 } { + ad_form -extend -name recover -form { + {authority_id:integer(select) + {label {[_ acs-kernel.authentication_authority]}} + {options $authority_options} + } } } + + ad_form -extend -name recover -form [list [list username:text($username_widget) [list label "Username"]]] -validate { + {username + { ![empty_string_p [acs_user::get_by_username -authority_id $authority_id -username $username]] } + { Could not find username at authority } + } + } + + set user_id_widget_name username } + + + + set submission_p 0 -ad_form -extend -name recover -form { - {username:text - {label "Username"} - {value $username} - } -} -validate { - {username - { ![empty_string_p [acs_user::get_by_username -authority_id $authority_id -username $username]] } - { Could not find username at authority } - } -} +ad_form -extend -name recover -on_request {} # We handle form submission here, because otherwise we can't handle both the case where we use the form # and the case where we don't in one go -if { [form is_valid recover] || (![form is_submission recover] && [exists_and_not_null username]) } { +if { [form is_valid recover] || (![form is_submission recover] && ([exists_and_not_null username] || [exists_and_not_null email])) } { array set recover_info [auth::password::recover_password \ -authority_id $authority_id \ - -username $username] + -username $username \ + -email $email] set login_url [ad_get_login_url -authority_id $authority_id -username $username] } Index: openacs-4/packages/acs-subsite/www/register/user-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/user-new.adp,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-subsite/www/register/user-new.adp 3 Sep 2003 19:48:05 -0000 1.12 +++ openacs-4/packages/acs-subsite/www/register/user-new.adp 16 Sep 2003 13:08:38 -0000 1.13 @@ -1,6 +1,6 @@ <master> <property name="title">#acs-subsite.Register#</property> <property name="context">{#acs-subsite.Register#}</property> - <property name="focus">register.username</property> + <property name="focus">register.email</property> <formtemplate id="register"></formtemplate> Index: openacs-4/packages/acs-subsite/www/user/password-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/password-update.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-subsite/www/user/password-update.tcl 15 Sep 2003 10:31:25 -0000 1.14 +++ openacs-4/packages/acs-subsite/www/user/password-update.tcl 16 Sep 2003 13:08:38 -0000 1.15 @@ -115,7 +115,7 @@ # Should we change the password management API to optionally check and return account_status? # In which case we'd have to also check local account status - if { [ad_conn user_id] } { + if { ![ad_conn user_id] } { ad_user_login $user_id }