Commit 9a5b9b5f authored by mattl's avatar mattl

Initial user deletion and export pages

parent ef9794ae
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
<p class="text-center text-muted">Libre.fm is supported by <a href="http://bytemark.co.uk">Bytemark</a>, <a href="http://bigv.io">BigV</a>, <a href="http://archive.org">The Internet Archive</a> and <a href="http://isc.org">ISC</a></p> <p class="text-center text-muted">Libre.fm is supported by <a href="http://bytemark.co.uk">Bytemark</a>, <a href="http://bigv.io">BigV</a>, <a href="http://archive.org">The Internet Archive</a> and <a href="http://isc.org">ISC</a></p>
<p>For help regarding removal of accounts, data export and more please contact <a href="http://mat.tl">Matt Lee</a>.</p>
<hr /> <hr />
</div> </div>
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<li><a href="{$this_user->getURL()}"> <span class="glyphicon glyphicon-user"></span> {$this_user->name} <span class="badge">SUPPORTER</span></a></li> <li><a href="{$this_user->getURL()}"> <span class="glyphicon glyphicon-user"></span> {$this_user->name} <span class="badge">SUPPORTER</span></a></li>
<li><a href="{$this_user->getURL()}/stats"> <span class="glyphicon glyphicon-stats"></span> {$this_user->name}/stats</a></li> <li><a href="{$this_user->getURL()}/stats"> <span class="glyphicon glyphicon-stats"></span> {$this_user->name}/stats</a></li>
<li><a href="{$this_user->getURL()}/recent-tracks"> <span class="glyphicon glyphicon-headphones"></span> {$this_user->name}/recent</a></li> <li><a href="{$this_user->getURL()}/recent-tracks"> <span class="glyphicon glyphicon-headphones"></span> {$this_user->name}/recent</a></li>
<li><a href="{$base_url}/user-export.php"><span class="glyphicon glyphicon-user"></span> Data export</a></li>
<li><a href="{$base_url}/user-delete.php"><span class="glyphicon glyphicon-user"></span> Deleting my account</a></li>
<li><a href="{$base_url}/login.php?action=logout"> <li><a href="{$base_url}/login.php?action=logout">
<span class="glyphicon glyphicon-log-out"> <span class="glyphicon glyphicon-log-out">
</span> </span>
......
{include file='header.tpl' subheader='user-header.tpl' showbio=true}
<h3>Delete my data</h3>
<p>If you'd like to delete your Libre.fm profile, including your listening data, please email <a href="mailto:mattl@cnuk.org">mattl@cnuk.org</a> &mdash; please make sure your email contains enough detail, including your email address for your account and your username. All data requests are handled by one person, so please be patient. If you don't hear from someone in 72 hours, please email again.</p>
{include file='footer.tpl'}
\ No newline at end of file
{include file='header.tpl' subheader='user-header.tpl' showbio=true}
<h3>Export my data</h3>
<p>If you'd like an export of your listening data, please email <a href="mailto:mattl@cnuk.org">mattl@cnuk.org</a> &mdash; please make sure your email contains enough detail, including your email address for your account and your username. All data requests are handled by one person, so please be patient. If you don't hear from someone in 72 hours, please email again.</p>
{include file='footer.tpl'}
\ No newline at end of file
<?php
/* GNU FM -- a free network service for sharing your music listening habits
Copyright (C) 2009 Free Software Foundation, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once('database.php');
require_once('user-menu.php');
require_once('templating.php');
require_once('data/User.php');
require_once('data/RemoteUser.php');
require_once('data/TagCloud.php');
require_once('data/Server.php');
if (!isset($_GET['user']) && $logged_in == false) {
displayError("Error", "User not set. You shouldn't be here.");
}
try {
if(strstr($_GET['user'], '@')) {
$user = new RemoteUser($_GET['user']);
} else {
$user = new User($_GET['user']);
}
} catch (Exception $e) {
$user = null;
}
if (isset($user->name)) {
$smarty->assign('geo', Server::getLocationDetails($user->location_uri));
try {
$aUserScrobbles = $user->getScrobbles(10);
$smarty->assign('scrobbles', $aUserScrobbles);
} catch (Exception $e) {}
try {
$aUserNowPlaying = $user->getNowPlaying(10);
$smarty->assign('nowplaying', $aUserNowPlaying);
} catch (Exception $e) {}
if ($user->hasLoved()) {
$recommendedArtists = $user->getRecommended(10);
$smarty->assign('recommendedArtists', $recommendedArtists);
if($user->remote) {
// Just get the 10 most recently loved artists from a remote user
$lovedArtists = $user->getLovedArtists(10);
$smarty->assign('lovedArtists', $lovedArtists);
} else {
$lovedArtists = TagCloud::generateTagCloud('loved', 'artist', 10, 'userid', $user->uniqueid);
$smarty->assign('lovedArtists', $lovedArtists);
}
}
$smarty->assign('isme', ($this_user->name == $user->name));
$smarty->assign('me', $user);
$smarty->assign('pagetitle', $user->name);
$smarty->assign('awesomenumber', $user->uniqueid);
$smarty->assign('extra_head_links', array(
array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url . '/rdf.php?fmt=rss&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Journal)',
'href' => $user->journal_rss
),
array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
)
));
$neighbours = $user->getNeighbours(9);
if (!empty($neighbours)) {
$smarty->assign('neighbours', $neighbours);
$smarty->assign('sideblocks', array('sidebar-neighbours.tpl'));
}
$submenu = user_menu($user, 'Overview');
$smarty->assign('submenu', $submenu);
$smarty->display('user-profile.tpl');
} else {
displayError("User not found", "User not found, shall I call in a missing persons report?");
}
<?php
/* GNU FM -- a free network service for sharing your music listening habits
Copyright (C) 2009 Free Software Foundation, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once('database.php');
require_once('user-menu.php');
require_once('templating.php');
require_once('data/User.php');
require_once('data/RemoteUser.php');
require_once('data/TagCloud.php');
require_once('data/Server.php');
if (!isset($_GET['user']) && $logged_in == false) {
displayError("Error", "User not set. You shouldn't be here.");
}
try {
if(strstr($_GET['user'], '@')) {
$user = new RemoteUser($_GET['user']);
} else {
$user = new User($_GET['user']);
}
} catch (Exception $e) {
$user = null;
}
if (isset($user->name)) {
$smarty->assign('geo', Server::getLocationDetails($user->location_uri));
try {
$aUserScrobbles = $user->getScrobbles(10);
$smarty->assign('scrobbles', $aUserScrobbles);
} catch (Exception $e) {}
try {
$aUserNowPlaying = $user->getNowPlaying(10);
$smarty->assign('nowplaying', $aUserNowPlaying);
} catch (Exception $e) {}
if ($user->hasLoved()) {
$recommendedArtists = $user->getRecommended(10);
$smarty->assign('recommendedArtists', $recommendedArtists);
if($user->remote) {
// Just get the 10 most recently loved artists from a remote user
$lovedArtists = $user->getLovedArtists(10);
$smarty->assign('lovedArtists', $lovedArtists);
} else {
$lovedArtists = TagCloud::generateTagCloud('loved', 'artist', 10, 'userid', $user->uniqueid);
$smarty->assign('lovedArtists', $lovedArtists);
}
}
$smarty->assign('isme', ($this_user->name == $user->name));
$smarty->assign('me', $user);
$smarty->assign('pagetitle', $user->name);
$smarty->assign('awesomenumber', $user->uniqueid);
$smarty->assign('extra_head_links', array(
array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url . '/rdf.php?fmt=rss&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Journal)',
'href' => $user->journal_rss
),
array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
)
));
$neighbours = $user->getNeighbours(9);
if (!empty($neighbours)) {
$smarty->assign('neighbours', $neighbours);
$smarty->assign('sideblocks', array('sidebar-neighbours.tpl'));
}
$submenu = user_menu($user, 'Overview');
$smarty->assign('submenu', $submenu);
$smarty->display('user-profile.tpl');
} else {
displayError("User not found", "User not found, shall I call in a missing persons report?");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment