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