[Solved] user names crossing

13 years 2 months ago
Lisa Norman
Posts: 129
More
Topic Author
[Solved] user names crossing #21
I just did. Same result. Sorry. That would mean it is somehow limited to my site. OTOH -- I am on Joomla 1.5.23. Are you on 1.7?

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Antonio Durán
Posts: 7784
More
[Solved] user names crossing #22
No, I am testing with 1.5.x.

I wanted to discard link problems, so now it seems the problem is directly in the SSO process.

Do another test: log in directly trough Moodle, and see if you are correclty logged in Joomla/Moodle or not.

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Lisa Norman
Posts: 129
More
Topic Author
[Solved] user names crossing #23
Logging in through moodle logged in correctly. The name did not switch.

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Antonio Durán
Posts: 7784
More
[Solved] user names crossing #24
Ok.

Then I would do some debugging: just edit moodle/auth/joomdle/land.php and put:
exit ();
at the top, so it does not complete the login process, and does not redirect.
Now, look at the url you have in the address bar, specifically the params. I get:
...username=abc2%20def2&token=5010ef4c65...

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Lisa Norman
Posts: 129
More
Topic Author
[Solved] user names crossing #25
Hm. When I did that and logged in, the log in did not complete -- the page seemed to hang with the loading page stuck. Eventually, I hit "back" and got an invalid token page...no parameters in the url.

I thought the login hadn't worked since the page never showed, so went back to the home page to log in again and noted that I was logged in (user menu was showing).
I restored land.php to normal - in case other users logged in, this being a live site in the middle of classes.
I then clicked through the user menu moodle and was logged in as the right person.

This is what I got for a URL on that moodle/joomla page:
http:.../index.php?option=com_joomdle&view=wrapper&moodle_page_type=course&id=5&Itemid=66

(hidden client site name out of confidentiality) If you need to see the site, let me know and I can send you a link.

I think you're onto something...

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Antonio Durán
Posts: 7784
More
[Solved] user names crossing #26
Hi.

From what you say, it seems you may have redirectless SSO enabled. If so, disable it and test again, so we can see the real address and params being used for SSO.

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Lisa Norman
Posts: 129
More
Topic Author
[Solved] user names crossing #27
Ah! Sorry about that.

http:.../moodle//auth/joomdle/land.php?username=abc%20def&token=c8e07de0b16e8ec5d687973c3e204ee6&use_wrapper=0&create_user=0&wantsurl=index.php

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Antonio Durán
Posts: 7784
More
[Solved] user names crossing #28
Ok, it shows the same for me.

So, next step is to place the exit() a little down the code, after params are read, with a:
echo $username;

prior to it. Let see what username it is being used to call the auth method....

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Lisa Norman
Posts: 129
More
Topic Author
[Solved] user names crossing #29
I put it right before:

$override_itemid = $auth->call_method ('getDefaultItemid');

it said: "abc def" -- which is the one I'm logging in as.

--I just noticed something highly relevant, I think, and went back to test it after doing this one.

When I have redirectless SSO turned ON, the username switches to truncated at the space. When I have it OFF, I stay as the same user.

I only noticed that when I had to turn it OFF for the test and then magically I was logged in as the right user later.

I thought at first I'd only been seeing things, but I just verified this.

Please Log in or Create an account to join the conversation.

13 years 2 months ago
Antonio Durán
Posts: 7784
More
[Solved] user names crossing #30
Hi.

Indeed, it was very relevant: I changed to redirect-less SSO, and can confirm your problem as a bug.

I tested a fix that seems to work. You can apply it yourself if you want:
File: "plugins/user/joomdlehooks.php"
Function: log_into_moodle

Before:
$login_url = $moodle_url;
Add:
$username = str_replace (' ', '%20', $username);


Thanks for your help debugging!

Please Log in or Create an account to join the conversation.