if (isset($_POST['admin_ceder']) and isset($_POST['admin_ceder_pass']))
{
if ($err = ret_check_asociado($_POST['admin_ceder'])
- or $err = ret_check_password($u = new Usuario($_POST['admin_ceder']),
+ or $err = ret_check_password($_SESSION['user'],
$_POST['admin_ceder_pass'])
- or $err = $_SESSION['user']->cederAdmin($u))
+ or $err = $_SESSION['user']->cederAdmin(
+ $u = new Usuario($_POST['admin_ceder'])))
{
marco_cabecera('Ceder Administración', true);
error($err);
{
if (check_numero($_POST['admin_cred'])
and check_asociado($_POST['admin_cred_user'])
- and check_password($u = new Usuario($_POST['admin_cred_user']),
- $_POST['admin_cred_pass']))
+ and check_password($_SESSION['user'], $_POST['admin_cred_pass']))
{
+ $u = new Usuario($_POST['admin_cred_user']);
$u->addCreditos($_POST['admin_cred']);
ok('Se agregaron '.$_POST['admin_cred'].' créditos al usuario '
.$u->getNombre().' '.$u->getApellido());