fix for issue #7125

Check already implemented in core/settings/ajax/changedisplayname.php