Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
style(Auth): Sort Auth Form
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Jul 15, 2019
1 parent 5d18d4f commit 35691fc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
13 changes: 5 additions & 8 deletions apps/controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
namespace apps\controllers;

use apps\models\User;
use apps\models\form\UserLoginForm;
use apps\models\form\UserConfirmForm;
use apps\models\form\UserRecoverForm;
use apps\models\form\UserRegisterForm;
use apps\models\form\Auth;

use Rid\Http\Controller;

Expand All @@ -23,7 +20,7 @@ class AuthController extends Controller
public function actionRegister()
{
if (app()->request->isPost()) {
$user = new UserRegisterForm();
$user = new Auth\UserRegisterForm();
$user->setData(app()->request->post());
$success = $user->validate();
if (!$success) {
Expand All @@ -50,7 +47,7 @@ public function actionRegister()

public function actionConfirm()
{
$confirm = new UserConfirmForm();
$confirm = new Auth\UserConfirmForm();
$confirm->setData(app()->request->get());
$success = $confirm->validate();
if (!$success) {
Expand All @@ -67,7 +64,7 @@ public function actionConfirm()
public function actionRecover()
{
if (app()->request->isPost()) {
$form = new UserRecoverForm();
$form = new Auth\UserRecoverForm();
$form->setData(app()->request->post());
$success = $form->validate();
if (!$success) {
Expand Down Expand Up @@ -97,7 +94,7 @@ public function actionLogin()
$left_attempts = config('security.max_login_attempts') - $test_attempts;

if (app()->request->isPost()) {
$login = new UserLoginForm();
$login = new Auth\UserLoginForm();
$login->setData(app()->request->post());
$success = $login->validate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Time: 18:51
*/

namespace apps\models\form;
namespace apps\models\form\Auth;

use apps\components\User\UserInterface;
use Rid\Helpers\StringHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Time: 17:19
*/

namespace apps\models\form;
namespace apps\models\form\Auth;

use apps\libraries\Constant;
use apps\components\User\UserInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Time: 14:42
*/

namespace apps\models\form;
namespace apps\models\form\Auth;


use apps\components\User\UserInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Time: 18:57
*/

namespace apps\models\form;
namespace apps\models\form\Auth;

use apps\libraries\Site;

Expand Down

0 comments on commit 35691fc

Please sign in to comment.