News:

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

Main Menu

Setting a global password for ordinary members

Started by Geoffw, October 17, 2017, 04:58:55 AM

Previous topic - Next topic

Geoffw

Is it possible to set a global password for Forum members, that I can change annually?  I know this is less secure, but being able to do so would suit the way our community use our Forum.

Arantor

One could be written but if you apply it to all members, that would imply that every single member also has administrative access.

I'm genuinely intrigued by the use case you have because I've never come across it before.

Sir Osis of Liver

What do you do when the password gets out (it will)?  Anyone will have access to the forum - spammers, trolls, idiots.  Wouldn't be any point in having a password, may as well give guests permissions to use it.  You could use .htaccess authentication, but don't know if that will do what you want.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

If you really want to do it, here's how -

Register.php



// Set the options needed for registration.

/// Set global password
$_POST['passwrd1'] = 'password';
$_POST['passwrd2'] = 'password';

$regOptions = array(
'interface' => 'guest',



Then remove the two password inputs in Register.template.php -



/* echo '
<dl class="register_form" id="password1_group">
<dt><strong><label for="smf_autov_pwmain">', $txt['choose_pass'], ':</label></strong></dt>
<dd>
<input type="password" name="passwrd1" id="smf_autov_pwmain" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
<span id="smf_autov_pwmain_div" style="display: none;">
<img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
</span>
</dd>
</dl>
<dl class="register_form" id="password2_group">
<dt><strong><label for="smf_autov_pwverify">', $txt['verify_pass'], ':</label></strong></dt>
<dd>
<input type="password" name="passwrd2" id="smf_autov_pwverify" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
<span id="smf_autov_pwverify_div" style="display: none;">
<img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_valid.gif" alt="*" />
</span>
</dd>
</dl>';
*/



A bit of a kludge, but it werks gud!
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

That forces all new accounts, without changing any existing accounts.

I'd still be interested to know why this is a thing, because there's almost certainly a better way.

Sir Osis of Liver

Would have to run a query to change passwords in target group, but it should only have to be done once, could do it with phpmyadmin.  The password could be sent to new members by modifying activation email.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

True, though I'm still never a fan of just handing out instructions to people that will have repercussions if followed when it's not clear what problem it is that is trying to be solved...

Sir Osis of Liver

I'm inclined to agree, but sometimes it's easier just to give them what they want, and let them decide if it works for them, especially when it's difficult to understand what they're after.  It's a simple edit, easily reversed.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: