Created
January 23, 2014 14:15
-
-
Save christian-kolb/8579081 to your computer and use it in GitHub Desktop.
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
<?php | |
define('BYPASS_TOKEN_CHECK', true); | |
require('system/initialize.php'); | |
class Reset extends Frontend { | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->import('Database'); | |
$this->import('Input'); | |
} | |
public function run() { | |
$username = "yourUsername"; | |
$newPassword = "8e0107bf1c7fbeef6538dff7173aa458e7dd585e:8c37627a0e2c606189e7765"; // "reset123" | |
$this->Database->prepare(" | |
UPDATE tl_user | |
SET password = ? | |
WHERE username = ? | |
")->execute( | |
$newPassword, | |
$username | |
); | |
} | |
} | |
$reset = new Reset(); | |
$reset->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool! Mit folgender Änderung wird das Passwort dynamisch:
Das ganze liesse sich sehr praktisch auch ausbauen, z.B. dass er zuerst prüft ob der Benutzername vorhanden ist und dann ggf. aktualisiert.