Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Rename registration action, pass in IP address.
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Oct 29, 2014
1 parent 435788a commit 8a46541
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Expand Up @@ -7,7 +7,7 @@
use FluxBB\Models\User;
use FluxBB\Models\ConfigRepositoryInterface;

class Register extends Action
class CreateUser extends Action
{
protected $config;

Expand All @@ -34,7 +34,7 @@ protected function run()
'dst' => $this->config->get('o_default_dst'),
'language' => $this->config->get('o_default_lang'),
'style' => $this->config->get('o_default_style'),
//'registration_ip' => $this->request->getClientIp(),
'registration_ip' => $this->get('ip'),
//'last_visit' => $this->request->server('REQUEST_TIME', time()),
]);

Expand Down
2 changes: 1 addition & 1 deletion src/FluxBB/Server/ServiceProvider.php
Expand Up @@ -58,7 +58,7 @@ protected function registerActions(Server $server)
$server->registerAction('category', 'FluxBB\Actions\ViewCategory');
$server->registerAction('conversation', 'FluxBB\Actions\GetConversation');
$server->registerAction('post', 'FluxBB\Actions\GetPost');
$server->registerAction('handle_registration', 'FluxBB\Actions\Register');
$server->registerAction('handle_registration', 'FluxBB\Actions\CreateUser');
$server->registerAction('handle_login', 'FluxBB\Actions\Login');
$server->registerAction('logout', 'FluxBB\Actions\Logout');
$server->registerAction('post_edit_handler', 'FluxBB\Actions\EditPost');
Expand Down
4 changes: 3 additions & 1 deletion src/FluxBB/Web/Controllers/AuthController.php
Expand Up @@ -16,7 +16,9 @@ public function registerForm()
public function register()
{
try {
$this->execute('handle_registration');
$this->execute('handle_registration', [
'ip' => $this->request->getClientIp(),
]);

return $this->redirect('index', trans('fluxbb::register.reg_complete'));
} catch (ValidationFailed $e) {
Expand Down

0 comments on commit 8a46541

Please sign in to comment.