Exemplo n.º 1
0
     }
     $dataProfile[UserDetail::USER_DETAIL_CAMERA] = json_encode($camara);
     $dataProfile[UserDetail::USER_DETAIL_GLASSES] = json_encode($lentes);
     $dataProfile[UserDetail::USER_DETAIL_EQUIPMENT] = json_encode($equipo);
     $dataProfile[UserDetail::USER_DETAIL_PHOTOGRAPHY_SCHOOL] = $escuelaFotografia;
     $dataProfile[UserDetail::USER_DETAIL_MORE_EDUCATION] = $masEducacion;
     $dataProfile[UserDetail::USER_DETAIL_LABORAL_EXPERIENCE] = json_encode($experienciaLaboral);
     $dataProfile[UserDetail::USER_DETAIL_LANGUAGES] = json_encode($idiomas);
     $dataProfile[UserDetail::USER_DETAIL_HABILITIES] = json_encode($habilidades);
     $dataProfile[UserDetail::USER_DETAIL_RUT] = $rut;
     $dataProfile[UserDetail::USER_DETAIL_PAYMENT_USER] = $user_pago;
     // Update interests
     UserDetail::updateInterests($currentUser->id, $interes);
 }
 // Update detail user info
 UserDetail::update($currentUser->id, $dataProfile);
 if ($validNewEmail) {
     // Send email with link to activate new email
     $confirmUrl = UrlHelper::getUrl('actions/perfilAction.php') . '?act_code=' . $user->act_code . '&new_email_code=' . $user->new_email_code . '&act=new_email_confirmation';
     $asunto = "Confirmación de cambio de correo electrónico";
     $params = array('site_url' => FConfig::getUrl(), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'fullname' => $currentUser->full_name, 'confirmation_url' => $confirmUrl);
     $body = FMailer::replaceParameters($params, file_get_contents('../views/emails/newEmailConfirmation.html'));
     $mailer = new FMailer();
     $receivers = array(array('email' => $currentUser->email, 'name' => $currentUser->full_name));
     $mailer->setReceivers($receivers);
     $mailer->sendEmail($asunto, $body);
     $app->addMessage("Un correo electrónico te ha sido enviado a la dirección <b>" . $email . "</b> para confirmarla.");
     $app->redirect($app->getHelper('UrlHelper')->getUrl('editarPerfil'));
 } else {
     $app->redirect($app->getHelper('UrlHelper')->getUrl('perfil'));
 }