Skip to content

Commit

Permalink
Custom Create User function now not called if remote account
Browse files Browse the repository at this point in the history
Fix for #721
  • Loading branch information
eSilverStrike committed Dec 30, 2016
1 parent 38c7d1c commit 34f6306
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions system/lib-custom.php.dist
Expand Up @@ -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
*/

/**
Expand Down
13 changes: 8 additions & 5 deletions system/lib-plugins.php
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 34f6306

Please sign in to comment.