Created
March 29, 2016 13:44
-
-
Save thinkingmedia/7dafb8e27ed999440038 to your computer and use it in GitHub Desktop.
Fix for registration and signed in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use CakeDC\Users\Controller\Traits\LoginTrait; | |
use CakeDC\Users\Controller\Traits\RegisterTrait; | |
class UsersController extends AppController { | |
use RegisterTrait { | |
register as traitRegister; | |
} | |
use LoginTrait; | |
public function register() | |
{ | |
if($this->Auth->user('id')) { | |
return $this->redirect('/'); | |
} | |
return $this->traitRegister(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment