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E,IAAI;EACf,KAAK,EAAE,IAAI;EL1CX,0BAAoC;IKuCtC;2DACwD;MAIpD,SAAS,EAAE,GAAG;;AAIlB;;GAEG;AAEF,cAAe;EACd,KAAK,EAAE,KAAK;;AAGd,oDAAmB;EACjB,WAAW,EAAE,wBAAwB;EACrC,KAAK,EAAE,OAAO;EACd,WAAW,EAAE,OAAO;EACpB,cAAc,EAAE,SAAS;;AAG3B,eAAgB;EAEd,SAAS,EAAE,KAAK;;AAGlB,eAAgB;EAEd,SAAS,EAAE,KAAK;ELtEhB,0BAAoC;IKoEtC,eAAgB;MAIZ,SAAS,EAAE,GAAG;MACd,MAAM,EAAE,IAAI;;AAIhB;;GAEG;AAEF,gBAAiB;EAChB,WAAW,EAAE,mBAAmB;EAChC,SAAS,EAAE,GAAG;EACd,cAAc,EAAE,SAAS;EACzB,KAAK,EAAE,OAAO;ELhGd,WAAW,EAFC,uOAAmD",
|
||||
"sources": ["main.scss","modules/_modules.scss","partials/_base.scss","partials/_navigation.sass","partials/_forms.sass","partials/_fonts.scss","partials/_typography.scss"],
|
||||
"mappings": "AAAA;gFACgF;AAEhF;;;;GAIG;ACPH;;GAEG;AAcH;;GAEG;AClBH;;GAEG;AFmBK,kCAAuB;AACvB,iCAAsB;AACtB,yCAA8B;AEnBtC,IAAK;EACH,gBAAgB,EAAE,OAAO;;AAG3B,cAAe;EACb,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,IAAI;EACb,sBAAsB,EAAE,MAAM;EAC9B,cAAc,EAAE,MAAM;;AAGxB,6DAAU;EACR,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,YAAY;EACrB,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;;AAGrB;;GAEG;AAEH,WAAY;EAEV,UAAU,EAAE,iCAAiC;EAC7C,UAAU,EAAE,KAAK;EACjB,cAAc,EAAE,MAAM;EACtB,sBAAsB,EAAE,MAAM;;AAGhC;;GAEG;AAEH,UAAW;EAET,UAAU,EAAE,iCAAi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.scss","modules/_modules.scss","partials/_base.scss","partials/_navigation.sass","partials/_messages.scss","partials/_forms.sass","partials/_fonts.scss","partials/_typography.scss"],
|
||||
"names": [],
|
||||
"file": "main.css"
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
.message {
|
||||
padding: 15px;
|
||||
font-size: 1.2em;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Eater\Glim\Handler\Verify;
|
||||
|
||||
use Eater\Glim\Handler\Session;
|
||||
|
||||
class Action extends Session
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Eater\Glim\Handler\Verify;
|
||||
|
||||
use Aura\Session\Segment;
|
||||
use Eater\Glim\Handler\Session;
|
||||
use Eater\Glim\Model\EmailAddressQuery;
|
||||
use Eater\Glim\Model\User;
|
||||
|
||||
class Show extends Session
|
||||
{
|
||||
protected $shouldHaveUser = false;
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$verify = $this->attr('verify');
|
||||
$verifyParts = explode('-', $verify, 2);
|
||||
|
||||
if (count($verifyParts) < 2) {
|
||||
return $this->notFound();
|
||||
}
|
||||
|
||||
$id = intval($verifyParts[0]);
|
||||
$verification = $verifyParts[1];
|
||||
|
||||
$user = $this->getUser();
|
||||
|
||||
if ($user !== null) {
|
||||
|
||||
$email = $user->getEmailAddressRelatedByEmail();
|
||||
|
||||
if ($email === null || $email->getId() !== $id || $email->getVerified()) {
|
||||
return $this->notFound();
|
||||
}
|
||||
|
||||
/* @var \Aura\Session\Session $session */
|
||||
$session = $this->get('session');
|
||||
$segment = $session->getSegment('main');
|
||||
$segment->set('userId', null);
|
||||
$this->setUser(null);
|
||||
}
|
||||
|
||||
$email = EmailAddressQuery::create()->findOneById($id);
|
||||
|
||||
if ($email === null || $email->getVerified() || $email->getVerification() !== $verification) {
|
||||
return $this->notFound();
|
||||
}
|
||||
|
||||
return $this->render('login.html.twig', [
|
||||
'message' => 'Please login to verify your email',
|
||||
'action' => $this->getRequest()->getUri()->getPath()
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue