summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-04-30 18:07:05 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-04-30 18:07:05 +0000
commit411e56e378855b73760f44f61d9883c45b0cbe78 (patch)
tree2a5a3be23ee5e3b20bc2facecbe2d2991eef2752
parent2c1987d5b3e5ee4119802630874e0eae39338931 (diff)
downloadusers-411e56e378855b73760f44f61d9883c45b0cbe78.tar.gz
users-411e56e378855b73760f44f61d9883c45b0cbe78.tar.bz2
users-411e56e378855b73760f44f61d9883c45b0cbe78.zip
clean up users email liberty_content_prefs fiasco
-rw-r--r--BitUser.php8
-rw-r--r--preferences.php12
-rw-r--r--templates/user_preferences.tpl6
3 files changed, 13 insertions, 13 deletions
diff --git a/BitUser.php b/BitUser.php
index de3d252..3bbca41 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.65 2006/04/30 17:43:37 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.66 2006/04/30 18:07:04 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitUser.php,v 1.65 2006/04/30 17:43:37 squareing Exp $
+ * $Id: BitUser.php,v 1.66 2006/04/30 18:07:04 squareing Exp $
* @package users
*/
@@ -40,7 +40,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.65 $
+ * @version $Revision: 1.66 $
* @package users
* @subpackage BitUser
*/
@@ -154,7 +154,7 @@ class BitUser extends LibertyAttachable {
$this->mUserId))));
//print("displayName: ".$this->mInfo['display_name']);
$this->defaults();
- $this->mInfo['publicEmail'] = scrambleEmail( $this->mInfo['email'], ($this->getPreference( 'email is public' ) ? $this->getPreference( 'email is public' ) : NULL) );
+ $this->mInfo['publicEmail'] = scrambleEmail( $this->mInfo['email'], ( $this->getPreference( 'users_email_display' ) ? $this->getPreference( 'users_email_display' ) : NULL ) );
}
$this->mTicket = substr( md5( session_id() . $this->mUserId ), 0, 20 );
} else {
diff --git a/preferences.php b/preferences.php
index ec2f878..bafc158 100644
--- a/preferences.php
+++ b/preferences.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/preferences.php,v 1.29 2006/04/30 17:43:37 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/preferences.php,v 1.30 2006/04/30 18:07:05 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: preferences.php,v 1.29 2006/04/30 17:43:37 squareing Exp $
+ * $Id: preferences.php,v 1.30 2006/04/30 18:07:05 squareing Exp $
* @package users
* @subpackage functions
*/
@@ -107,8 +107,8 @@ if (isset($_REQUEST["prefs"])) {
}
}
- $email_isPublic = isset($_REQUEST['email_isPublic']) ? $_REQUEST['email_isPublic']: 'n';
- $editUser->storePreference( 'email is public', $email_isPublic, 'users');
+ $users_email_display = isset($_REQUEST['users_email_display']) ? $_REQUEST['users_email_display']: 'n';
+ $editUser->storePreference( 'users_email_display', $users_email_display, 'users');
if (isset($_REQUEST['view_user'])) {
header ("location: ".USERS_PKG_URL."preferences.php?view_user=$editUser->mUserId");
} else {
@@ -195,8 +195,8 @@ $gBitSmarty->assign( 'editUser', $editUser->mInfo );
//SPIDERKILL $style = $editUser->getPreference( 'theme', $style);
//SPIDERKILL $gBitSmarty->assign_by_ref('style', $style);
$real_name = $editUser->mInfo["real_name"];
-$gBitSmarty->assign('email_isPublic', $editUser->getPreference( 'email is public', 'n'));
-$scramblingMethods = array("n", "strtr", "unicode", "x"); // email_isPublic utilizes 'n'
+$gBitSmarty->assign('users_email_display', $editUser->getPreference( 'users_email_display', 'n'));
+$scramblingMethods = array("n", "strtr", "unicode", "x"); // users_email_display utilizes 'n'
$gBitSmarty->assign_by_ref('scramblingMethods', $scramblingMethods);
$scramblingEmails = array(tra("no"), scrambleEmail($editUser->mInfo['email'], 'strtr'), scrambleEmail($editUser->mInfo['email'], 'unicode')."-".tra("unicode"), scrambleEmail($editUser->mInfo['email'], 'x'));
$gBitSmarty->assign_by_ref('scramblingEmails', $scramblingEmails);
diff --git a/templates/user_preferences.tpl b/templates/user_preferences.tpl
index 6b61a92..b3658a0 100644
--- a/templates/user_preferences.tpl
+++ b/templates/user_preferences.tpl
@@ -44,11 +44,11 @@
</div>
<div class="row">
- {formlabel label="Is email public?" for="email_isPublic"}
+ {formlabel label="Is email public?" for="users_email_display"}
{forminput}
- <select name="email_isPublic" id="email_isPublic">
+ <select name="users_email_display" id="users_email_display">
{section name=ix loop=$scramblingMethods}
- <option value="{$scramblingMethods[ix]|escape}" {if $email_isPublic eq $scramblingMethods[ix]}selected="selected"{/if}>{$scramblingEmails[ix]}</option>
+ <option value="{$scramblingMethods[ix]|escape}" {if $users_email_display eq $scramblingMethods[ix]}selected="selected"{/if}>{$scramblingEmails[ix]}</option>
{/section}
</select>
{formhelp note="Pick the scrambling method to prevent spam."}