- Added a new Email defintion (which will soon see it's components changed)
- Added a new post-install script for composer which adds a project skeleton "ready to use". - Error 500 are now handled properly in production; waiting to see if adjustements will be required before adding other code pages.
This commit is contained in:
1 parent
09b3e47c19
commit
01bb926ca7
30 files changed
+887
-2
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace %NAMESPACE%\Lib;
|
||||
|
||||
use Picea\Picea;
|
||||
use Storage\Session;
|
||||
use Ulmus\User\Entity\User;
|
||||
use Ulmus\User\Lib\Authenticate;
|
||||
use %NAMESPACE%\Entity;
|
||||
|
||||
/**
|
||||
* @Security("locked" => false)
|
||||
* @RouteParam("methods" => [ "GET", "POST" ])
|
||||
*/
|
||||
trait ControllerTrait {
|
||||
use \Lean\ControllerTrait;
|
||||
|
||||
public ? \Ulmus\User\Entity\User $user;
|
||||
|
||||
protected Authenticate $authenticate;
|
||||
|
||||
public function __construct(Picea $picea, Session $session, Authenticate $authenticate) {
|
||||
$this->initializeController($picea, $session, $authenticate);
|
||||
}
|
||||
|
||||
public function initializeController(Picea $picea, Session $session, Authenticate $authenticate) {
|
||||
$this->picea = $picea;
|
||||
$this->authenticate = $authenticate;
|
||||
$this->session = $session;
|
||||
$this->user = $authenticate->rememberMe( Entity\User::repository() ) ?: new User();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user