Posts made by Visvanath Ratnaweera

Picture of Particularly helpful Moodlers Picture of Translators

Spain will be the next.

Sanchez goes nuclear on cam: 'Migrant' Musk attacked as Spanish declares social media 'failed state'

Hindustani Times, 4 February 2026

Spain’s Prime Minister Pedro Sanchez has ignited a global debate after launching a fierce attack on social media giants at the World Governments Summit in Dubai. Calling social platforms a “failed state,” he accused them of spreading disinformation, hate speech, and harmful content targeting children. Sanchez also took direct aim at Elon Musk amid a row over migrant regularisation and online influence. Now, Spain is moving toward tough new rules, including age bans and criminal liability for executives. But how far will this digital crackdown go, and who could be affected next?

https://www.hindustantimes.com/videos/sanchez-goes-nuclear-on-cam-migrant-musk-attacked-as-spanish-declares-social-media-failed-state-101770148150384.html

Picture of Particularly helpful Moodlers Picture of Translators
Hi Dan

Thanks to your support I made great progress.

I wanted two things: a) the current (manaul) Moodle users to be able to log in to the same account by authenticating through the federation. b) In the case of disturbances in the federation the ability for them to switch back to the manual account. Now it is pretty clear to me, once the email addresses on either side are tied together, there is no confusion.
 
I was overthinking in a), mainly because of the value in mdl_user:username, which Moodle expects to be unique. The simple answer to that is: SAML2 doesn't look at mdl_user:username - to be more accurate, can make it not to look at mdl_user:username!

The surprising answer to 2) is, one can make SMAL2 not to care the mdl_user:auth too! That is what I did and now the the users can alternatively login from the federation or the local account - or from both at the same time! That'll take care of a lot of user support requests.

The final thing I need is,
3) new users who join through the federation (first) to get the jdoe from their e-mail addresses like jdoe@sub.example.com as mdl_user:username. As it is now, mdl_user:username also gets the value jdoe@sub.example.com - the same as mdl_user:email.

I know, the federation should tell me what I should take. But I'm not making progress and forced to "reverse engineer".
sad
 
I looked at two things:
A. IdP Meta data
https://fr.example.com/signedmetadata/metadata.xml has things like,

md:EntityDescriptor entityID="https://idp.sub.example.com/idp/shibboleth"
 
[...]
md:ContactPerson contactType="support"
md:GivenName xxxxxxx
md:SurName xxxx
md:EmailAddress mailto:username@sub.example.com
[...]
 
 

There are many more like that, but always md:GivenName, md:SurName, md:EmailAddress - never the username alone. Should it be there, somewhere?

B. Information to be provided to Service

Under UserID there is exactly the jdoe (without domain) I am looking for. I've put:
- UserID in Data mapping (Username)
- On creation in Update local (Username)
- Never in Update external (Username) and
- Locked in Lock value (username)
 
But new users get email as mdl_user:username. 
 
Do you have any suggestions what I need to do?
 
 
Picture of Particularly helpful Moodlers Picture of Translators
Hi Ken

I am monitoring the results in the database as well as in the site admin GUI - deleting, changing columns and recreating. That is not the problem. The problem is to get the exact behaviour which will IMO cause the least user confusion. I'm almost there. Only one piece is missing. See https://moodle.org/mod/forum/discuss.php?d=471843#p1895758.
Picture of Particularly helpful Moodlers Picture of Translators
Hi Jordi, hi all

Now a discussion about (new) ways and means slowly unfolding, your comment, "suggest providing some way of contacting back (by a human) to recover some email or account" sticks out. I expected a strong faction for that thing, that two letter abbreviation. If not that, then by (human) professionals - professional in the sense for-money - things like task forces, continent managers, global managers, change managers, awareness evangelists, work-flows, planning tools, a committee to chose the planning tool, a committee to decide whether a planning committee is necessary, another to decide whom to invite to the committee out of the parade of manager, each with a unique (fancy) title, new titles created. Side-topic, who will finally bell the cat, "not me!"
 
You get the point?