X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fpersons%2Fupdate.php;h=60882398c3f1c784281f73d4413fb67950d9e7e5;hb=350bb4d9c096b0cfb877fb67ab94ebac753a98a5;hp=b1fd1436cf88d9ec9f30bc8b33036e288581f72e;hpb=bc69546bd6a533ce02ec4e8efb8abeeb459c584c;p=plewww.git diff --git a/planetlab/persons/update.php b/planetlab/persons/update.php index b1fd143..6088239 100644 --- a/planetlab/persons/update.php +++ b/planetlab/persons/update.php @@ -28,42 +28,6 @@ if( isset($_GET['id']) && is_numeric($_GET['id']) ) { $errors= array(); if( $is_submitted ) { - // attempt to update this person - $first_name= $_POST['first_name']; - $last_name= $_POST['last_name']; - $title= $_POST['title']; - $email= $_POST['email']; - $phone= $_POST['phone']; - $url= $_POST['url']; - $bio= str_replace("\r", "", $_POST['bio']); - $password1= $_POST['password1']; - $password2= $_POST['password2']; - - if( $password1 != $password2 ) { - $errors[]= "The passwords do not match"; - } - - if( count($errors) == 0 ) { - $update_vals= array(); - $update_vals['first_name']= $first_name; - $update_vals['last_name']= $last_name; - $update_vals['title']= $title; - $update_vals['email']= $email; - $update_vals['phone']= $phone; - $update_vals['url']= $url; - $update_vals['bio']= $bio; - - if( $password1 != "" ) - $update_vals['password']= $password1; - - $rc= $api->UpdatePerson( intval( $person_id ), $update_vals); - - if ( $rc == 1 ) { - plc_redirect(l_person($person_id)); - } elseif ($rc === NULL) { - $errors[] = $api->error(); - } - } } else { // get details for the user $person_details= $api->GetPersons( array( intval( $person_id ) ), array( "person_id", "first_name", "last_name", "title", "email", "phone", "url", "bio" ) );