aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-01-28 12:27:05 -0500
committerCash Costello <cash.costello@gmail.com>2012-01-28 12:27:05 -0500
commit11a7ca1c5c23af990422783b14d021a7c177032b (patch)
tree6fc2de6bb0d20b048a9f9a2e697850fd2b16143e /start.php
parent80ed1e24b59d62c411cb2bed5535d9e6fd9fcc9a (diff)
downloadelgg-11a7ca1c5c23af990422783b14d021a7c177032b.tar.gz
elgg-11a7ca1c5c23af990422783b14d021a7c177032b.tar.bz2
fixed bug where email wasn't being passed to register action - now using annotations instead of metadata to hold openid identifier
Diffstat (limited to 'start.php')
-rw-r--r--start.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/start.php b/start.php
index a8e6fd94e..82dcd5c11 100644
--- a/start.php
+++ b/start.php
@@ -25,10 +25,8 @@ function openid_client_init() {
$base = elgg_get_plugins_path() . 'openid_client/lib';
elgg_register_library('openid_client', "$base/helpers.php");
- elgg_register_event_handler('create', 'user', 'openid_client_set_subtype', 1);
-
// don't let OpenID users set their passwords
- elgg_register_event_handler('pagesetup', 'system', 'openid_client_remove_email');
+ elgg_register_event_handler('pagesetup', 'system', 'openid_client_remove_password');
// the return to page needs to be public
elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'openid_client_public');
@@ -37,11 +35,10 @@ function openid_client_init() {
/**
* Set the correct subtype for OpenID users
*
- * @param string $event Event name
- * @param string $type Object type
- * @param ElggUser $user New user
+ * @param ElggUser $user New user
+ * @return void
*/
-function openid_client_set_subtype($event, $type, $user) {
+function openid_client_set_subtype($user) {
$db_prefix = elgg_get_config('dbprefix');
$guid = (int)$user->getGUID();
$subtype_id = (int)add_subtype('user', 'openid');
@@ -71,7 +68,7 @@ function openid_client_setup_menu($hook, $type, $menu, $params) {
'wordpress' => 'toggle',
),
);
- $items = elgg_trigger_plugin_hook('register', 'openid_login', null, $items);
+ $items = elgg_trigger_plugin_hook('register', 'openid_client:login', null, $items);
$priority = 100;
foreach ($items as $type => $providers) {
@@ -105,7 +102,7 @@ function openid_client_setup_menu($hook, $type, $menu, $params) {
/**
* Remove the password view from the account settings form
*/
-function openid_client_remove_email() {
+function openid_client_remove_password() {
$page_owner = elgg_get_page_owner_entity();
if ($page_owner && elgg_instanceof($page_owner, 'user', 'openid')) {
elgg_unextend_view('forms/account/settings', 'core/settings/account/password');
@@ -116,8 +113,8 @@ function openid_client_remove_email() {
* Add pages to the list of public pages for walled garden needed for OpenID
* transaction
*
- * @param string $hook Hook name
- * @param string $type Hook type
+ * @param string $hook Hook name
+ * @param string $type Hook type
* @param array $pages Array of public pages
* @return array
*/