fyi, this, added at the end of LocalSettings.php, worked on a local install (1.11) :
$wgHooks['InitPreferencesForm'][] = 'fnMyHook';
function fnMyHook($prefs, $request) { global $wgUser;
$prefs->mUserEmail = $wgUser->getEmail();
return false; }
Alexis Moinet wrote :
GF wrote :
IS there any way for doing what I need (apart modifying brutally the specialPreferences.php?
I would suggest to add the appropriate Hook (http://www.mediawiki.org/wiki/Hook) in LocalSettings.php.
Someone with more experience with hooks and SpecialPreferences.php might tell you which hook to use.
my guess would be the "InitPreferencesForm" Hook (with something like $foo->mUserEmail = $wgUser->getEmail(); )