这是一个简单的代码。它不返回任何错误,也没有结果。哪里可能有问题?
$salt = JUserHelper::genRandomPassword(32);
$crypted = JUserHelper::getCryptedPassword(base64_decode($this->OtherDB->loadObject()->Password), $salt);
$password = $crypted.':'.$salt;
//$password - b913a58019885777428774bacd622fd3:V62lC8MthS117GUDa2KJMN9lsk4E5VGo
$db = JFactory::getDbo();
$query = 'UPDATE `#__users` SET `#__users`.`password` = \''.$password.'\' WHERE `#__users`.`username` = \''.$username.'\'';
$db->setQuery($query);