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 -N -r1.22 -r1.23
--- openacs-4/packages/acs-subsite/lib/user-info.tcl 27 Oct 2014 16:39:45 -0000 1.22
+++ openacs-4/packages/acs-subsite/lib/user-info.tcl 7 Aug 2017 23:47:58 -0000 1.23
@@ -68,8 +68,10 @@
lappend read_only_elements authority_id
}
-if { $user(authority_id) != [auth::authority::local] || ![auth::UseEmailForLoginP] || \
- ([acs_user::site_wide_admin_p] && [llength [auth::authority::get_authority_options]] > 1) } {
+if { $user(authority_id) != [auth::authority::local]
+ || ![auth::UseEmailForLoginP]
+ || ([acs_user::site_wide_admin_p] && [llength [auth::authority::get_authority_options]] > 1)
+ } {
lappend elms_list {
username:text(text)
{label "[_ acs-subsite.Username]"}
@@ -216,12 +218,23 @@
# LARS HACK: Make the URL and email elements real links
if { ![form is_valid user_info] } {
- element set_properties user_info email -display_value "[element get_value user_info email]"
- if {![string match -nocase "http://*" [element get_value user_info url]]} {
- element set_properties user_info url -display_value \
- "[element get_value user_info url]"
+ element set_properties user_info email \
+ -display_value "[element get_value user_info email]"
+
+ set url [element get_value user_info url]
+ if { ![string match -nocase "http://*" $url]
+ && ![string match -nocase "https://*" $url]
+ } {
+ element set_properties user_info url \
+ -display_value "$url"
} else {
element set_properties user_info url -display_value \
- "[element get_value user_info url]"
+ "$url"
}
}
+
+# Local variables:
+# mode: tcl
+# tcl-indent-level: 4
+# indent-tabs-mode: nil
+# End: