Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: vagrant on September 19, 2008, 04:30:07 PM

Title: How do i force hiding email addy ?
Post by: vagrant on September 19, 2008, 04:30:07 PM
Before i update d the forum from smf1 i used to be able to force the hiding of email address's with a small change to the code.

I have found the section of code i need to modify but can not work out what i need to change .... can someone point me in the right direction please.

'hide_email' => array(
            'type' => 'check',
            'value' => empty($cur_profile['hide_email']) ? true : false,
            'label' => $txt['allow_user_email'],
            'permission' => 'profile_identity',
            'input_validate' => create_function('&$value', '
                $value = $value == 0 ? 1 : 0;


thanks.
vagrant
Title: Re: How do i force hiding email addy ?
Post by: H on September 19, 2008, 05:54:41 PM
SMF 2 has this option as a default setting :)

Admin area > Security and Moderation > Allow viewable email addresses.
Title: Re: How do i force hiding email addy ?
Post by: vagrant on September 19, 2008, 06:13:32 PM
Thanks for that  :)

Does that stop the "Allow users to email you?" from showing as an option in the profiles as well?.

vagrant
Title: Re: How do i force hiding email addy ?
Post by: vagrant on September 19, 2008, 07:51:57 PM
think i got my head around it now.

If i change 'permission' => 'profile_identity',

to

'permission' => 'admin_forum',

Would that stop users been able to change the  Allow users to email you? setting ?


edit post.

Yes i tried it after setting up another test forum and yes it does work  :D
I can garb a few hours sleep now  :) [/hr]
Title: Re: How do i force hiding email addy ?
Post by: vagrant on September 19, 2008, 09:56:31 PM
I spoke too soon.

Although that stops email contact from previous members i am unable to find an option to make it the default for new members *sigh*

Help please. I need my forums to be very anon due to their content, so they need to be restricted to posting and PM's.

vagrant
Title: Re: How do i force hiding email addy ?
Post by: N3RVE on September 30, 2008, 10:04:29 AM
Whats the issue here?
The setting posted by H would apply that setting as default for both newly registered and existing members.
Which specific version of SMF are you running?

-[n3rve]
Title: Re: How do i force hiding email addy ?
Post by: saruhan on September 30, 2008, 01:42:53 PM
thanks  :'(
Title: Re: How do i force hiding email addy ?
Post by: Oldiesmann on October 03, 2008, 10:56:34 PM
Quote from: saruhan on September 30, 2008, 01:42:53 PM
thanks  :'(

We can't help you if you don't explain what you need...
Title: Re: How do i force hiding email addy ?
Post by: vagrant on October 09, 2008, 05:26:47 PM
sorry for the delay, have been in hospital :(

Profile-Modify.php  i made the change to

Quote'hide_email' => array(
            'type' => 'check',
            'value' => empty($cur_profile['hide_email']) ? true : false,
            'label' => $txt['allow_user_email'],
            'permission' => 'profile_identity',
            'input_validate' => create_function('&$value', '
                $value = $value == 0 ? 1 : 0;

and replaced the line permission to 'permission' => 'admin_forum',

that stopped them been able to set it to show even if they wanted it to.

I have since found that by editing the database  "members" i could set the default
hide_email to 1   (was 0)

Then in the registration forum i just removed the option all together.

Now there is no way for members to have their email details showing even if the wanted to.... which is what i was trying to do, and no way to contact them using the email contact form, meaning they must use the PM system or post in the forums, i hope.

so unless i spot an error in what i have done this is now solved.