Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 08:41 am EST
Geeklog Forums
CUSTOM_userCreate() is called twice?
Status: offline
OMAL
Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
I use CUSTOM_userCreate() to add additional data to an additional table when admin creates an user.
But I got the fatal error of "Duplicate entry for key 'PRIMARY' to the table" when I create an user.
USER_createAccount() in lib-user.php has the following lines and that causes the error.
if ($_CONF['custom_registration'] && function_exists('CUSTOM_userCreate')) {
CUSTOM_userCreate($uid, $batchImport);
}
PLG_createUser($uid);
CUSTOM_userCreate function is called here, and again in the PLG_createUser funcion.
I deleted one function call in PLG_createUser() funcion so it seems solved, but I think it looks like a bug for everyone.
What do you think?
Thanks.
But I got the fatal error of "Duplicate entry for key 'PRIMARY' to the table" when I create an user.
USER_createAccount() in lib-user.php has the following lines and that causes the error.
Text Formatted Code
// call custom registration function and pluginsif ($_CONF['custom_registration'] && function_exists('CUSTOM_userCreate')) {
CUSTOM_userCreate($uid, $batchImport);
}
PLG_createUser($uid);
CUSTOM_userCreate function is called here, and again in the PLG_createUser funcion.
I deleted one function call in PLG_createUser() funcion so it seems solved, but I think it looks like a bug for everyone.
What do you think?
Thanks.
21
19
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Looks like a bug. Will be fixed next version of Geeklog. Added GitHub report here:
https://github.com/Geeklog-Core/geeklog/issues/952
Thanks!
One of the Geeklog Core Developers.
https://github.com/Geeklog-Core/geeklog/issues/952
Thanks!
One of the Geeklog Core Developers.
20
21
Quote
All times are EST. The time is now 08:41 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content