<?php
/**
 * To update password first time in Jelastic
 *
 * PHP version 5
 *
 * @category   PHP
 * @package    Restyaboard
 * @subpackage Core
 * @author     Restya <info@restya.com>
 * @copyright  2014 Restya
 * @license    http://restya.com/ Restya Licence
 * @link       http://restya.com/
 */
require_once '/var/www/webroot/ROOT/server/php/config.inc.php';
require_once '/var/www/webroot/ROOT/server/php/libs/core.php';
$password = $argv[1];
$email = $argv[2];
$result = pg_query_params($db_lnk, 'UPDATE users SET password = $1, email = $2 WHERE username = $3', array(
    getCryptHash($password),
    $argv[2],
    'admin'
));