Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F13790171
userVerifyEmail.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
userVerifyEmail.php
View Options
<?php
global
$global
,
$config
;
if
(
!
isset
(
$global
[
'systemRootPath'
]
)
)
{
require_once
'../videos/configuration.php'
;
}
require_once
$global
[
'systemRootPath'
]
.
'objects/user.php'
;
$obj
=
new
stdClass
(
)
;
$obj
->
error
=
true
;
$obj
->
msg
=
"Unknown error"
;
if
(
!
empty
(
$_GET
[
'users_id'
]
)
)
{
$user
=
new
User
(
$_GET
[
'users_id'
]
)
;
$verified
=
$user
->
getEmailVerified
(
)
;
if
(
empty
(
$verified
)
)
{
if
(
User
::
sendVerificationLink
(
$_GET
[
'users_id'
]
)
)
{
$obj
->
error
=
false
;
$obj
->
msg
=
__
(
"Verification Sent"
)
;
}
}
else
{
$obj
->
msg
=
__
(
"Already verified"
)
;
}
}
else
if
(
!
empty
(
$_GET
[
'code'
]
)
)
{
$result
=
User
::
verifyCode
(
$_GET
[
'code'
]
)
;
if
(
$result
)
{
$msg
=
__
(
"Email Verified"
)
;
header
(
"Location: {$global['webSiteRootURL']}?success={$msg}"
)
;
}
else
{
$msg
=
__
(
"Email verification error"
)
;
header
(
"Location: {$global['webSiteRootURL']}?error={$msg}"
)
;
}
}
header
(
'Content-Type: application/json'
)
;
die
(
json_encode
(
$obj
)
)
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Aug 27, 14:48 (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2084155
Default Alt Text
userVerifyEmail.php (1 KB)
Attached To
Mode
R58 TurboFlop
Attached
Detach File
Event Timeline