public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/web/reset-password.php
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
<?php
2
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
3
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/triggers.user.inc.php';
5
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'admin') {
6
header('Location: /admin/dashboard');
7
exit();
8
}
9
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'domainadmin') {
10
header('Location: /domainadmin/mailbox');
11
exit();
12
}
13
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
14
header('Location: /user');
15
exit();
16
}
18
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
19
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
20
$_SESSION['index_query_string'] = $_SERVER['QUERY_STRING'];
22
if (isset($_GET['token'])) $is_reset_token_valid = reset_password("check", $_GET['token']);
23
else $is_reset_token_valid = False;
25
$template = 'reset-password.twig';
26
$template_data = [
27
'is_mobileconfig' => str_contains($_SESSION['index_query_string'], 'mobileconfig'),
28
'is_reset_token_valid' => $is_reset_token_valid,
29
'reset_token' => $_GET['token']
30
];
32
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';