diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/output.php | 7 | ||||
-rw-r--r-- | engine/lib/user_settings.php | 7 | ||||
-rw-r--r-- | engine/lib/users.php | 9 |
3 files changed, 14 insertions, 9 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php index 989eca60e..6554481f5 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -234,7 +234,7 @@ function elgg_clean_vars(array $vars = array()) { * * @example * elgg_normalize_url(''); // 'http://my.site.com/' - * elgg_normalize_url('dashboard'); // 'http://my.site.com/dashboard' + * elgg_normalize_url('dashboard'); // 'http://my.site.com/dashboard' * elgg_normalize_url('http://google.com/'); // no change * elgg_normalize_url('//google.com/'); // no change * @@ -257,6 +257,11 @@ function elgg_normalize_url($url) { $validated = filter_var($url, FILTER_VALIDATE_URL); } + // work around for handling absoluate IRIs (RFC 3987) - see #4190 + if (!$validated && (strpos($url, 'http:') === 0) || (strpos($url, 'https:') === 0)) { + $validated = true; + } + if ($validated) { // all normal URLs including mailto: return $url; diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index c71670357..af30d8f0d 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -346,6 +346,13 @@ function usersettings_init() { elgg_register_plugin_hook_handler('usersettings:save', 'user', 'users_settings_save'); elgg_register_action("usersettings/save"); + + // extend the account settings form + elgg_extend_view('forms/account/settings', 'core/settings/account/name', 100); + elgg_extend_view('forms/account/settings', 'core/settings/account/password', 100); + elgg_extend_view('forms/account/settings', 'core/settings/account/email', 100); + elgg_extend_view('forms/account/settings', 'core/settings/account/language', 100); + elgg_extend_view('forms/account/settings', 'core/settings/account/default_access', 100); } elgg_register_event_handler('init', 'system', 'usersettings_init'); diff --git a/engine/lib/users.php b/engine/lib/users.php index 3a86c1faa..1b3cca799 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1021,7 +1021,7 @@ function elgg_get_user_validation_status($user_guid) { return; } - if ($md->value) { + if ($md[0]->value) { return true; } @@ -1562,13 +1562,6 @@ function users_init() { elgg_register_widget_type('friends', elgg_echo('friends'), elgg_echo('friends:widget:description')); - // extend the account settings form - elgg_extend_view('forms/account/settings', 'core/settings/account/name', 100); - elgg_extend_view('forms/account/settings', 'core/settings/account/password', 100); - elgg_extend_view('forms/account/settings', 'core/settings/account/email', 100); - elgg_extend_view('forms/account/settings', 'core/settings/account/language', 100); - elgg_extend_view('forms/account/settings', 'core/settings/account/default_access', 100); - // Register the user type elgg_register_entity_type('user', ''); |