News:

Wondering if this will always be free?  See why free is better.

Main Menu

How do i force hiding email addy ?

Started by vagrant, September 19, 2008, 04:30:07 PM

Previous topic - Next topic

vagrant

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

H

SMF 2 has this option as a default setting :)

Admin area > Security and Moderation > Allow viewable email addresses.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

vagrant

#2
Thanks for that  :)

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

vagrant

vagrant

#3
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]

vagrant

#4
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

N3RVE

#5
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]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan


Oldiesmann

Michael Eshom
Christian Metal Fans

vagrant

#8
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.

Advertisement: