diff --git a/system/lib-custom.php.dist b/system/lib-custom.php.dist index 50a678c66..0d9764dc1 100644 --- a/system/lib-custom.php.dist +++ b/system/lib-custom.php.dist @@ -176,6 +176,10 @@ function CUSTOM_templateSetVars($templatename, $template) - All other users will see the standard User profile with the optional extended custom information - Customization requires changes to a few of the core template files to add {customfields} variables - See notes below in the custom function about the template changes + - Remember remote accounts (like OAuth and OpenID) behave differently when they are created (and logging in) so the + CUSTOM_userCreate function is not run for new remote accounts. All other functions are as once + created in Geeklog, remote accounts behave pretty much like the other accounts. If you do not want to use the rest + of the custom user functions for remote accounts you will have to handle that within the custom function */ /** diff --git a/system/lib-plugins.php b/system/lib-plugins.php index f84cba8fe..5b591e78b 100755 --- a/system/lib-plugins.php +++ b/system/lib-plugins.php @@ -1194,11 +1194,14 @@ function PLG_createUser($uid) } if ($_CONF['custom_registration']) { - if (is_callable('CUSTOM_userCreate')) { - CUSTOM_userCreate($uid, false); - } elseif (is_callable('CUSTOM_user_create')) { - COM_errorLog(__FUNCTION__ . ': CUSTOM_user_create is deprecated as of Geeklog 2.1.2. Please use CUSTOM_userCreate instead.'); - CUSTOM_user_create($uid); + // Check to see if user is a remote user. Cannot call custom user create function if a remote user + if (!SEC_inGroup('Remote Users', $uid)) { + if (is_callable('CUSTOM_userCreate')) { + CUSTOM_userCreate($uid, false); + } elseif (is_callable('CUSTOM_user_create')) { + COM_errorLog(__FUNCTION__ . ': CUSTOM_user_create is deprecated as of Geeklog 2.1.2. Please use CUSTOM_userCreate instead.'); + CUSTOM_user_create($uid); + } } } }