Advertisement:

Author Topic: How do i force hiding email addy ?  (Read 5165 times)

Offline vagrant

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
    • Discount Le Creuset
How do i force hiding email addy ?
« 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.

Code: [Select]
'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
« Last Edit: September 19, 2008, 09:57:35 PM by vagrant »

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,662
  • Gender: Male
Re: How do i force hiding email addy ?
« Reply #1 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.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Offline vagrant

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
    • Discount Le Creuset
Re: How do i force hiding email addy ?
« Reply #2 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
« Last Edit: September 19, 2008, 06:16:19 PM by vagrant »

Offline vagrant

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
    • Discount Le Creuset
Re: How do i force hiding email addy ?
« Reply #3 on: September 19, 2008, 07:51:57 PM »
think i got my head around it now.

If i change
Code: [Select]
'permission' => 'profile_identity',
to

Code: [Select]
'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]
« Last Edit: September 19, 2008, 08:12:56 PM by vagrant »

Offline vagrant

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
    • Discount Le Creuset
Re: How do i force hiding email addy ?
« Reply #4 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
« Last Edit: September 19, 2008, 09:59:46 PM by vagrant »

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: How do i force hiding email addy ?
« Reply #5 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]
« Last Edit: September 30, 2008, 10:07:39 AM by [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

Offline saruhan

  • Semi-Newbie
  • *
  • Posts: 24
Re: How do i force hiding email addy ?
« Reply #6 on: September 30, 2008, 01:42:53 PM »
thanks  :'(

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,830
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: How do i force hiding email addy ?
« Reply #7 on: October 03, 2008, 10:56:34 PM »
thanks  :'(

We can't help you if you don't explain what you need...
Michael Eshom

Offline vagrant

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
    • Discount Le Creuset
Re: How do i force hiding email addy ?
« Reply #8 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.
« Last Edit: October 09, 2008, 05:31:51 PM by vagrant »