~ubuntu-branches/debian/sid/boinc/sid

« back to all changes in this revision

Viewing changes to html/user/delete_profile.php

  • Committer: Package Import Robot
  • Author(s): Steffen Moeller
  • Date: 2011-08-08 01:36:51 UTC
  • mfrom: (6.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20110808013651-m1hs3cltiveuteyn
Tags: 6.13.1+dfsg-2
* Bringing notify patch to unstable.
* Adjusted build dependency to libjpeg-dev (Closes: #641093)
* Further improvements on stripchart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
require_once("../inc/util.inc");
21
21
require_once("../inc/profile.inc");
22
22
 
23
 
function delete_profile($user) {
24
 
    $result = BoincProfile::delete_aux("userid = $user->id");
 
23
check_get_args(array("delete"));
 
24
 
 
25
$user = get_logged_in_user();
 
26
 
 
27
if (isset($_POST['delete']) && $_POST['delete']) {
 
28
    $result = delete_profile($user);
25
29
    if (!$result) {
26
30
        error_page("couldn't delete profile - please try again later");
27
31
    }
30
34
    $user->update("has_profile=0");
31
35
    echo "Your profile has been deleted<br>";
32
36
    page_tail();
33
 
}
34
 
 
35
 
$user = get_logged_in_user();
36
 
 
37
 
if (isset($_POST['delete']) && $_POST['delete']) {
38
 
    delete_profile($user);
39
37
    exit();
40
38
}
41
39