]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added return_to page to public pages of walled garden
authorcash <cash.costello@gmail.com>
Tue, 20 Dec 2011 02:41:08 +0000 (21:41 -0500)
committercash <cash.costello@gmail.com>
Tue, 20 Dec 2011 02:41:08 +0000 (21:41 -0500)
start.php

index b243d66743ea4766e58b4d8cceda4aca9caf7144..dbbb417854692bff366a9b733d38957613bffaea 100644 (file)
--- a/start.php
+++ b/start.php
@@ -29,6 +29,9 @@ function openid_client_init() {
 \r
        // don't let OpenID users set their passwords\r
        elgg_register_event_handler('pagesetup', 'system', 'openid_client_remove_email');\r
+\r
+       // the return to page needs to be public\r
+       elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'openid_client_public');\r
 }\r
 \r
 /**\r
@@ -108,3 +111,16 @@ function openid_client_remove_email() {
                elgg_unextend_view('forms/account/settings', 'core/settings/account/password');\r
        }\r
 }\r
+\r
+/**\r
+ * Add the return_to page to the list of public pages for walled garden\r
+ *\r
+ * @param string $hook Hook name\r
+ * @param string $type Hook type\r
+ * @param array  $pages Array of public pages\r
+ * @return array\r
+ */\r
+function openid_client_public($hook, $type, $pages) {\r
+       $pages[] = 'mod/openid_client/return.php';\r
+       return $pages;\r
+}\r