Fix auth login error

master v0.1.0
root 2 years ago
parent 56a57fe555
commit ba9d0893b7

@ -5,7 +5,7 @@
"keywords": ["application", "website", "development", "framework", "PHP", "PHP7"],
"license": "MIT",
"require": {
"php": ">=5.6.33",
"php": "7.4.*",
"composer/installers": "~1.0",
"fuel/core": "1.8.*",
"fuel/auth": "1.8.*",

@ -7,6 +7,7 @@ use Fuel\Core\FuelException;
use Fuel\Core\Input;
use Fuel\Core\Migrate;
use Fuel\Core\Request;
use Fuel\Core\Response;
use Fuel\Core\Str;
class Controller_Rest_Install extends Controller_Rest
@ -115,7 +116,7 @@ class Controller_Rest_Install extends Controller_Rest
public function post_admin()
{
try {
$config = Config::load('db', true);
$configCrypt = Config::load('crypt', true);
$email = Input::post('email');
$username = Input::post('username');
@ -128,7 +129,7 @@ class Controller_Rest_Install extends Controller_Rest
$user = Model_User::forge(array(
'username' => $username,
'email' => $email,
'password' => hash('sha512', $config['default']['hash'] . $password),
'password' => hash('sha512', $configCrypt['sodium']['cipherkey'] . $password),
'admin' => 1,
'lastlogin' => time()
));

Loading…
Cancel
Save