Skip to content

Add a new setting to allow replacing name and surname instead of scrambling #180

Open
kkrzyzaniak wants to merge 1 commit intocatalyst:MOODLE_311_STABLEfrom
kkrzyzaniak:feature/replace-user-name-and-surname-setting
Open

Add a new setting to allow replacing name and surname instead of scrambling #180
kkrzyzaniak wants to merge 1 commit intocatalyst:MOODLE_311_STABLEfrom
kkrzyzaniak:feature/replace-user-name-and-surname-setting

Conversation

@kkrzyzaniak
Copy link
Copy Markdown

Sometimes scrambling names is not enough.
A new setting was added to allow replacing first and last names in mdl_user table instead of scrambling all names. It replaces all names using a prefixes and user id. It doesn't modify users with usernames mentioned in keepusernames setting.

'department' => ['institution', 'department'],
'address' => ['address', 'city', 'country', 'lang', 'calendartype', 'timezone'],
];
self::replace_first_and_last_names();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be all or nothing? ie we either scramble all the names, OR we replace all the names. We don't want to do both? The scrambling is mildly expensive so we don't want to replace them and then needlessly scramble them again

Some unit tests would be good too

@kkrzyzaniak kkrzyzaniak force-pushed the feature/replace-user-name-and-surname-setting branch from de19388 to 7d49bcf Compare April 17, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants