Multiple usernodes created for each user
| Project: | Usernode |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
This issue has come up in the tracker before, but I haven't yet seen a resolution that worked for me. With me, new users were each getting 2 usernodes in a brand new installation of 5.1.4, which threw off buddylist and other modules.
I noticed the following at around line 218 of usernode.module:
usernode_save_node($node);
I edited it to check for an existing usernode before calling the function to save a new one:
if(!usernode_get_node($user))
{
usernode_save_node($node);
}This seems to have solved my problem, even if it hasn't gotten to the root of the problem. Can anyone think of a reason why this hack may backfire?
RE: the root of the problem ... I suspect that there's an issue with a module that authenticates users against our mail server. It's a somewhat customized version of http://drupal.org/project/isp_login, but it has never caused any trouble in other Drupal sites we have, but none of them use usernode. When that module is deactivated in this site, however, we do not get duplicate usernodes. I've been through that code, though, and don't see anything obvious, which is why I added the hack, above, to usernode.
