Skip to content

Commit

Permalink
Fix auth login error
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 13, 2022
1 parent 56a57fe commit ba9d089
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.*",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ services:
# COMPOSER
COMPOSER_VERSION: 1
volumes:
- .:/app
- .:/app
5 changes: 3 additions & 2 deletions fuel/app/classes/controller/rest/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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
Expand Down Expand Up @@ -115,7 +116,7 @@ public function post_tables()
public function post_admin()
{
try {
$config = Config::load('db', true);
$configCrypt = Config::load('crypt', true);

$email = Input::post('email');
$username = Input::post('username');
Expand All @@ -128,7 +129,7 @@ public function post_admin()
$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()
));
Expand Down

0 comments on commit ba9d089

Please sign in to comment.