set(array( 'username' => $username, 'email' => $email, 'password' => hash('sha512', $config['default']['hash'] . $password), 'admin' => 0, 'lastlogin' => time() )); $user->save(); Session::set('user', $user); Response::redirect('/home'); } } catch (FuelException $e) { $view->set('error', $e->getMessage()); } $view->set_safe('start_js', $start_js); $view->set_safe('end_js', $end_js); return $view; } }