
alexis.moinet at fpms
May 9, 2008, 2:13 AM
Post #3 of 3
(132 views)
Permalink
|
|
Re: enable email but disable email change.
[In reply to]
|
|
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(); ) _______________________________________________ MediaWiki-l mailing list MediaWiki-l[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
|