- Removed GLOBALS from conf.pl
- HTML messages optimization.
- Added support for requesting read receipts (MDN) and delivery receipts.
+ - Added the ability to stop users changing their names and email addresses.
Version 1.2.4 -- 25 January 2002
--------------------------------
if(!$frame_top) {
$frame_top = "_top";
}
+if(!$edit_identity) {
+ $edit_identity = "true";
+}
+if(!$edit_name) {
+ $edit_name = "true";
+}
if ($ARGV[0] eq '--install-plugin') {
print "Activating plugin " . $ARGV[1]
print "R Return to Main Menu\n";
} elsif ($menu == 4) {
print $WHT."General Options\n".$NRM;
- print "1. Default Charset : $WHT$default_charset$NRM\n";
- print "2. Data Directory : $WHT$data_dir$NRM\n";
- print "3. Attachment Directory : $WHT$attachment_dir$NRM\n";
- print "4. Directory Hash Level : $WHT$dir_hash_level$NRM\n";
- print "5. Default Left Size : $WHT$default_left_size$NRM\n";
- print "6. Usernames in Lowercase : $WHT$force_username_lowercase$NRM\n";
- print "7. Allow use of priority : $WHT$default_use_priority$NRM\n";
- print "8. Hide SM attributions : $WHT$hide_sm_attributions$NRM\n";
- print "9. Allow use of receipts : $WHT$default_use_mdn$NRM\n";
+ print "1. Default Charset : $WHT$default_charset$NRM\n";
+ print "2. Data Directory : $WHT$data_dir$NRM\n";
+ print "3. Attachment Directory : $WHT$attachment_dir$NRM\n";
+ print "4. Directory Hash Level : $WHT$dir_hash_level$NRM\n";
+ print "5. Default Left Size : $WHT$default_left_size$NRM\n";
+ print "6. Usernames in Lowercase : $WHT$force_username_lowercase$NRM\n";
+ print "7. Allow use of priority : $WHT$default_use_priority$NRM\n";
+ print "8. Hide SM attributions : $WHT$hide_sm_attributions$NRM\n";
+ print "9. Allow use of receipts : $WHT$default_use_mdn$NRM\n";
+ print "10. Allow editing of identity : $WHT$edit_identity$NRM\n";
+ if (lc($edit_identity) eq "false") {
+ print "11. Allow editing of name : $WHT$edit_name$NRM\n";
+ }
print "\n";
print "R Return to Main Menu\n";
} elsif ($menu == 5) {
elsif ($command == 7) { $default_use_priority = command37 (); }
elsif ($command == 8) { $hide_sm_attributions = command38 (); }
elsif ($command == 9) { $default_use_mdn = command39 (); }
+ elsif ($command == 10) { $edit_identity = command310 (); }
+ elsif ($command == 11) { $edit_name = command311 (); }
} elsif ($menu == 5) {
if ($command == 1) { command41 (); }
elsif ($command == 2) { $theme_css = command42 (); }
return "false";
}
+sub command310 {
+ print "This allows you to prevent the editing of the users name and";
+ print "email address. This is mainly useful when used with the";
+ print "retrieveuserdata plugin\n";
+ print "\n";
+
+ if (lc($edit_identity) eq "true") {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Allow editing? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $new_edit = <STDIN>;
+ if (($new_edit =~ /^y\n/i) || (($new_edit =~ /^\n/) && ($default_value eq "y"))) {
+ $edit_identity = "true";
+ } else {
+ $edit_identity = "false";
+ }
+ return $edit_identity;
+}
+
+sub command311 {
+ print "This option allows you to choose if the user can edit their full name";
+ print "even when you don't want them to change their username\n";
+ print "\n";
+
+ if (lc($edit_name) eq "true") {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Allow editing of the users full name? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $new_edit = <STDIN>;
+ if (($new_edit =~ /^y\n/i) || (($new_edit =~ /^\n/) && ($default_value eq "y"))) {
+ $edit_name = "true";
+ } else {
+ $edit_name = "false";
+ }
+ return $edit_name;
+}
sub command41 {
print "\nNow we will define the themes that you wish to use. If you have added\n";
print CF "\$default_use_priority = $default_use_priority;\n";
print CF "\$hide_sm_attributions = $hide_sm_attributions;\n";
print CF "\$default_use_mdn = $default_use_mdn;\n";
+ print CF "\$edit_identity = $edit_identity;\n";
+ print CF "\$edit_name = $edit_name;\n";
print CF "\n";
for ($ct=0; $ct <= $#plugins; $ct++) {
* $plugins[1] = 'attachment_common';
*/
+/**
+ * If you don't want to allow users to change their email address
+ * then you can set $edit_identity to false, if you want them to
+ * not be able to change their full name too then set $edit_name
+ * to false as well. $edit_name has no effect unless $edit_identity
+ * is false;
+ */
+
+global $edit_identity, $edit_name;
+$edit_identity = true;
+$edit_name = true;
+
/**
* Make sure there are no characters after the PHP closing
* tag below (including newline characters and whitespace).
'type' => SMOPT_TYPE_BOOLEAN ),
'$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
'type' => SMOPT_TYPE_BOOLEAN ),
+ '$edit_identity' => array( 'name' => _("Allow editing of identities"),
+ 'type' => SMOPT_TYPE_BOOLEAN ),
+ '$edit_name' => array( 'name' => _("Allow editing of full name"),
+ 'type' => SMOPT_TYPE_BOOLEAN ),
/* --------------------------------------------------------*/
'Group5' => array( 'name' => _("Message of the Day"),
'type' => SMOPT_TYPE_TITLE ),
/* Define the optpage load function for the personal options page. */
function load_optpage_data_personal() {
- global $data_dir, $username;
+ global $data_dir, $username, $edit_identity, $edit_name;
global $full_name, $reply_to, $email_address;
/* Set the values of some global variables. */
/* Build a simple array into which we will build options. */
$optvals = array();
- $optvals[SMOPT_GRP_CONTACT][] = array(
- 'name' => 'full_name',
- 'caption' => _("Full Name"),
- 'type' => SMOPT_TYPE_STRING,
- 'refresh' => SMOPT_REFRESH_NONE,
- 'size' => SMOPT_SIZE_HUGE
- );
-
- $optvals[SMOPT_GRP_CONTACT][] = array(
- 'name' => 'email_address',
- 'caption' => _("Email Address"),
- 'type' => SMOPT_TYPE_STRING,
- 'refresh' => SMOPT_REFRESH_NONE,
- 'size' => SMOPT_SIZE_HUGE
- );
+ if ($edit_identity || $edit_name) {
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'full_name',
+ 'caption' => _("Full Name"),
+ 'type' => SMOPT_TYPE_STRING,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'size' => SMOPT_SIZE_HUGE
+ );
+ } else {
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'full_name',
+ 'caption' => _("Full Name"),
+ 'type' => SMOPT_TYPE_COMMENT,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'comment' => $full_name
+ );
+ }
+
+ if ($edit_identity) {
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'email_address',
+ 'caption' => _("Email Address"),
+ 'type' => SMOPT_TYPE_STRING,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'size' => SMOPT_SIZE_HUGE
+ );
+ } else {
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'email_address',
+ 'caption' => _("Email Address"),
+ 'type' => SMOPT_TYPE_COMMENT,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'comment' => $email_address
+ );
+ }
$optvals[SMOPT_GRP_CONTACT][] = array(
'name' => 'reply_to',
'size' => SMOPT_SIZE_HUGE
);
- $identities_link_value = '<A HREF="options_identities.php">'
- . _("Edit Advanced Identities")
- . '</A> '
- . _("(discards changes made on this form so far)");
- $optvals[SMOPT_GRP_CONTACT][] = array(
- 'name' => 'identities_link',
- 'caption' => _("Multiple Identities"),
- 'type' => SMOPT_TYPE_COMMENT,
- 'refresh' => SMOPT_REFRESH_NONE,
- 'comment' => $identities_link_value
- );
+ if ($edit_identity) {
+ $identities_link_value = '<A HREF="options_identities.php">'
+ . _("Edit Advanced Identities")
+ . '</A> '
+ . _("(discards changes made on this form so far)");
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'identities_link',
+ 'caption' => _("Multiple Identities"),
+ 'type' => SMOPT_TYPE_COMMENT,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'comment' => $identities_link_value
+ );
+ }
/*** Load the Reply Citation Options into the array ***/
$optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options");