-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2633 from RestyaPlatform/issue/2216
Fixes #2216: Dynamic password change for admin user issue fixed
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* To update password first time in Jelastic | ||
* | ||
* PHP version 5 | ||
* | ||
* @category PHP | ||
* @package Restyaboard | ||
* @subpackage Core | ||
* @author Restya <[email protected]> | ||
* @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]; | ||
$result = pg_query_params($db_lnk, 'UPDATE users SET password = $1 WHERE username = $2', array( | ||
getCryptHash($password), | ||
'admin' | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters