juser "synchronize" creating 2 entries per user

Yes, that is the case. Attached are my juser settings. I have implemented this on my live site and the issue remains.

I just want my users to enter username, password, and email. Name is unnecessary. I assume this plugin and J! wants both so that is why name and username are equal.

On a side note, I did try making "name" a hidden calc element with
Code:
return '{mps_user___username}';
with AJAX off and yes to Calc on save only. In this case the juser setting was name=name and username=username. Same issue occured.
 

Attachments

  • juser.jpg
    juser.jpg
    86.4 KB · Views: 238
OK, the problem is "Sync on Edit", which grabs the currently logged on user's details, using JFactory::getuser(), and populates your form with them (but doesn't write anything out, unless you save the form).

The problem is, JFactory::getUser() grabs the details from the main J! session object (if it exists), rather than always reading from the actual #__users table. So it's picking up the username / name / email prior to your changes.

This is why it works if you log out and back in, as you force a session data reload from the #__users table.

We have some code that used to force J! to reload the main user session object when we committed changes involving the logged on user. But that code broke in 1.7, and we haven't had a chance to fix it yet.

Looking at it now.

-- hugh
 
I've been totally unable to work out why what we are doing doesn't reload the user session data. It should do. We call the same J! API code that J!'s user management does, and it's firing the same session handling code.

The code is still open in my workbench, and I'm chipping away at it, but so far no "Eureka!" moment. It's one of those "there's no reason it shouldn't work ... but it doesn't" issues.

-- hugh
 
Thanks for the update Hugh. This is not a showstopper bug by any means. So unless you rather I don't, I'll just bump the thread occasionally to keep it on your radar.
 
Thanks! It is bugging the poop out of me. I hate these "it should work" issues, where I really cannot even find a clue as to why it doesn't work.

-- hugh
 
Still no luck. I'm about out of ideas.

Been there myself many 'a' times. :rolleyes:

Not sure where this issue goes from here? I would like to see it resolved but I understand it is a fairly unlikely bug to come across. Although when you do it can really be a pain.

Should I bump in a month to see if you are completely out of ideas or still just nearly so? :)
 
It's one of those things I have on my back burner, and every time I work on the juser plugin, which is usually once a month or so when some other issue is raised on it, I have another stab at it.

I have no doubt at some point I will have an AH HA! moment and fix it. But that moment has yet to arrive.

-- hugh
 
It's one of those things I have on my back burner, and every time I work on the juser plugin, which is usually once a month or so when some other issue is raised on it, I have another stab at it.

I have no doubt at some point I will have an AH HA! moment and fix it. But that moment has yet to arrive.

Sounds good.

OMG, you must have a HUGE back burner. ;)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top