diff --git a/classes/FacebookLogin.php b/classes/FacebookLogin.php index 126a32910e..5b38d22118 100644 --- a/classes/FacebookLogin.php +++ b/classes/FacebookLogin.php @@ -129,7 +129,6 @@ public function createUser($accessToken, $user) { 'status' => '', 'password' => '', 'optin' => False, - 'emailpublic' => False, 'mp_alert' => False, 'facebook_id' => $user['id'] ); @@ -156,7 +155,6 @@ public function updateUser($user) { 'postcode' => $THEUSER->postcode(), 'url' => $THEUSER->url(), 'optin' => $THEUSER->optin(), - 'emailpublic' => False, 'password' => '', ); diff --git a/classes/User.php b/classes/User.php index 32a7ca0376..371d91418c 100644 --- a/classes/User.php +++ b/classes/User.php @@ -31,7 +31,6 @@ public function getUserDetails($user_id = False) { $data['name'] = $user->firstname() . " " . $user->lastname(); $data['url'] = $user->url(); $data['email'] = $user->email(); - $data['emailpublic'] = $user->emailpublic() == true ? "Yes" : "No"; $data['optin'] = $user->optin() == true ? "Yes" : "No"; $data['postcode'] = $user->postcode(); $data['website'] = $user->url(); @@ -61,7 +60,6 @@ public function getUpdateDetails($this_page, $user) { if ($user->facebook_user) { $details = $this->getUserDetails(); $details["password"] = ''; - $details["emailpublic"] = false; } else { $details["firstname"] = trim(get_http_var("firstname")); $details["lastname"] = trim(get_http_var("lastname")); @@ -69,7 +67,6 @@ public function getUpdateDetails($this_page, $user) { $details["password"] = trim(get_http_var("password")); $details["password2"] = trim(get_http_var("password2")); - $details["emailpublic"] = get_http_var("emailpublic") == "true" ? true : false; $details["email"] = trim(get_http_var("em")); $details["url"] = trim(get_http_var("url")); diff --git a/tests/UserTest.php b/tests/UserTest.php index 116d00db96..2751470de8 100644 --- a/tests/UserTest.php +++ b/tests/UserTest.php @@ -31,7 +31,6 @@ public function testAddUser() { "firstname" => 'Test', "lastname" => 'User', "email" => 'test@example.org', - "emailpublic" => '0', "postcode" => 'EH1 99SP', "mp_alert" => false, "url" => '', @@ -58,7 +57,6 @@ public function testEditUser() { $d = $u->update_self( array( 'firstname' => 'Experiment', 'lastname' => 'User', - 'emailpublic' => '0', 'postcode' => 'EH1 99SP', 'password' => '', 'url' => '', @@ -80,7 +78,6 @@ public function testEditUserEmail() { 'firstname' => 'Experiment', 'lastname' => 'User', 'email' => 'user@example.com', - 'emailpublic' => '0', 'postcode' => 'EH1 99SP', 'password' => '', 'url' => '', diff --git a/www/includes/easyparliament/templates/html/user/form.php b/www/includes/easyparliament/templates/html/user/form.php index d9139e8bcd..d5fd21f950 100644 --- a/www/includes/easyparliament/templates/html/user/form.php +++ b/www/includes/easyparliament/templates/html/user/form.php @@ -131,21 +131,6 @@ Optional and public - -

- -

- - -
-  
Let other users see your email address? -
- -
- >
- >
-
-

diff --git a/www/includes/easyparliament/templates/html/user/index.php b/www/includes/easyparliament/templates/html/user/index.php index 16a3990f1e..df9e1cf513 100644 --- a/www/includes/easyparliament/templates/html/user/index.php +++ b/www/includes/easyparliament/templates/html/user/index.php @@ -35,14 +35,9 @@ -

- Email - -
-
Website - '. _htmlentities($website) . '' ?> + '. _htmlentities($website) . '' ?>
diff --git a/www/includes/easyparliament/templates/html/user/join.php b/www/includes/easyparliament/templates/html/user/join.php index 6f9388cb3b..83136d99b0 100644 --- a/www/includes/easyparliament/templates/html/user/join.php +++ b/www/includes/easyparliament/templates/html/user/join.php @@ -95,21 +95,6 @@ Optional and public - -

- -

- - -
-  
Let other users see your email address? -
- -
- >
- >
-
-
 
Do you wish to receive occasional update emails about TheyWorkForYou.com?
diff --git a/www/includes/easyparliament/templates/html/user/view_user.php b/www/includes/easyparliament/templates/html/user/view_user.php index 62325fa276..706400bf36 100644 --- a/www/includes/easyparliament/templates/html/user/view_user.php +++ b/www/includes/easyparliament/templates/html/user/view_user.php @@ -6,14 +6,9 @@ -
- Email - -
-
Website - '. _htmlentities($website) . '' ?> + '. _htmlentities($website) . '' ?>
diff --git a/www/includes/easyparliament/user.php b/www/includes/easyparliament/user.php index 7edd137b59..1af2021a5f 100644 --- a/www/includes/easyparliament/user.php +++ b/www/includes/easyparliament/user.php @@ -61,7 +61,6 @@ class USER { public $lastname = ""; public $password = ""; // This will be a hashed version of a plaintext pw. public $email = ""; - public $emailpublic = ""; // boolean - can other users see this user's email? public $postcode = ""; public $url = ""; public $lastvisit = ""; // Last time the logged-in user loaded a page (GMT). @@ -96,7 +95,6 @@ public function init($user_id) { lastname, password, email, - emailpublic, postcode, url, lastvisit, @@ -122,7 +120,6 @@ public function init($user_id) { $this->lastname = $q->field(0,"lastname"); $this->password = $q->field(0,"password"); $this->email = $q->field(0,"email"); - $this->emailpublic = $q->field(0,"emailpublic") == 1 ? true : false; $this->postcode = $q->field(0,"postcode"); $this->facebook_id = $q->field(0,"facebook_id"); $this->facebook_token = $q->field(0,"facebook_token"); @@ -181,13 +178,10 @@ public function add($details, $confirmation_required=true) { $optin = $details["optin"] == true ? 1 : 0; - $emailpublic = $details["emailpublic"] == true ? 1 : 0; - $q = $this->db->query("INSERT INTO users ( firstname, lastname, email, - emailpublic, postcode, url, password, @@ -201,7 +195,6 @@ public function add($details, $confirmation_required=true) { :firstname, :lastname, :email, - :emailpublic, :postcode, :url, :password, @@ -216,7 +209,6 @@ public function add($details, $confirmation_required=true) { ':firstname' => $details["firstname"], ':lastname' => $details["lastname"], ':email' => $details["email"], - ':emailpublic' => $emailpublic, ':postcode' => $details["postcode"], ':url' => $details["url"], ':password' => $passwordforDB, @@ -680,7 +672,6 @@ public function firstname() { return $this->firstname; } public function lastname() { return $this->lastname; } public function password() { return $this->password; } public function email() { return $this->email; } - public function emailpublic() { return $this->emailpublic; } public function postcode() { return $this->postcode; } public function url() { return $this->url; } public function lastvisit() { return $this->lastvisit; } @@ -791,13 +782,11 @@ public function _update($details) { } // Convert internal true/false variables to MySQL BOOL 1/0 variables. - $emailpublic = $details["emailpublic"] == true ? 1 : 0; $optin = $details["optin"] == true ? 1 : 0; $q = $this->db->query("UPDATE users SET firstname = :firstname, lastname = :lastname, - emailpublic = :emailpublic, postcode = :postcode, url = :url," . $passwordsql @@ -810,7 +799,6 @@ public function _update($details) { ", array_merge($params, array( ':firstname' => $details['firstname'], ':lastname' => $details['lastname'], - ':emailpublic' => $emailpublic, ':postcode' => $details['postcode'], ':url' => $details['url'], ':optin' => $optin, @@ -1218,7 +1206,6 @@ public function confirm_email($token, $redirect=true) { 'url' => $this->url(), 'optin' => $this->optin(), 'user_id' => $user_id, - 'emailpublic' => $this->emailpublic() ); $ret = $this->_update($details); @@ -1423,7 +1410,6 @@ public function update_self_no_confirm($details) { $this->firstname = $newdetails["firstname"]; $this->lastname = $newdetails["lastname"]; - $this->emailpublic = $newdetails["emailpublic"]; $this->postcode = $newdetails["postcode"]; $this->url = $newdetails["url"]; $this->optin = $newdetails["optin"]; @@ -1477,7 +1463,6 @@ public function update_self($details, $confirm_email = true) { $this->firstname = $newdetails["firstname"]; $this->lastname = $newdetails["lastname"]; - $this->emailpublic = $newdetails["emailpublic"]; $this->postcode = $newdetails["postcode"]; $this->url = $newdetails["url"]; $this->optin = $newdetails["optin"];