Auto Enable "Contact Form"

Problem in 4.7

In Version 5 you can Auto Enable from your Admin section.

"Contact form" enables uses to contact each other. New user has to manually enable this from "my account". This is not intuitive and many users are not aware of this feature.

There is a need to auto Enable "Contact Form" when new user registers.

Solution
It's no good thing to modify core modules directly, but you can enable personal contact form ONLY at the time a new user registers. And once registered, users can disable the option.

In user.module at lline 186 ( line # may change) you can see this foreach loop:

foreach ($array as $key => $value) {
if ((substr($key, 0, 4) !== 'auth') && (!in_array($key, $user_fields)) && ($value !== null)) {
$data[$key] = $value;
}
}

Add following code after that:

if ( !isset($data['contact']) ) {
// enable personal contact form as user register
$data['contact'] = 1;
}

Risk
Admin will have to remember to apply this patch when upgrading.

How-To: