Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
288
Merge Requests
30
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
59438b34
Commit
59438b34
authored
2 days ago
by
Emiliano Balbuena
Browse files
Options
Download
(chore): Add path to email confirmation URL
parent
5a100825
goal/email-verification
1 merge request
!424
Email Confirmation
Pipeline
#105220882
failed with stages
in 12 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
Core/Email/Confirmation/Url.php
View file @
59438b34
...
...
@@ -13,6 +13,9 @@ use Minds\Entities\User;
class
Url
{
/** @var string */
const
EMAIL_CONFIRMATION_PATH
=
'/email-confirmation'
;
/** @var Config */
protected
$config
;
...
...
@@ -46,8 +49,9 @@ class Url
public
function
generate
(
array
$params
=
[])
:
string
{
return
sprintf
(
'%s?%s'
,
$this
->
config
->
get
(
'site_url'
),
'%s%s?%s'
,
rtrim
(
$this
->
config
->
get
(
'site_url'
),
'/'
),
static
::
EMAIL_CONFIRMATION_PATH
,
http_build_query
(
array_merge
(
$params
,
[
'__e_cnf_token'
=>
$this
->
user
->
getEmailConfirmationToken
(),
])),
...
...
This diff is collapsed.
Core/SEO/Defaults.php
View file @
59438b34
...
...
@@ -259,6 +259,14 @@ class Defaults
];
});
// Do not index email confirmation and redirect OG to /
Manager
::
add
(
Core\Email\Confirmation\Url
::
EMAIL_CONFIRMATION_PATH
,
function
(
$slugs
=
[])
{
return
[
'og:url'
=>
$this
->
config
->
site_url
,
'robots'
=>
'noindex'
];
});
Manager
::
add
(
'/wallet/tokens/transactions'
,
function
(
$slugs
=
[])
{
$meta
=
[
'title'
=>
'Transactions Ledger'
,
...
...
This diff is collapsed.
Spec/Core/Email/Confirmation/UrlSpec.php
View file @
59438b34
...
...
@@ -40,6 +40,6 @@ class UrlSpec extends ObjectBehavior
$this
->
setUser
(
$user
)
->
generate
([
'test'
=>
1
,
'phpspec'
=>
'yes'
])
->
shouldReturn
(
'https://phpspec.minds.test/?test=1&phpspec=yes&__e_cnf_token=%7Etoken%7E'
);
->
shouldReturn
(
'https://phpspec.minds.test/
email-confirmation
?test=1&phpspec=yes&__e_cnf_token=%7Etoken%7E'
);
}
}
This diff is collapsed.
Please
register
or
sign in
to comment