-
Notifications
You must be signed in to change notification settings - Fork 17
/
config.php
108 lines (86 loc) · 2.57 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/*
This file is part of UserMgmt.
Author: Chetan Varshney (http://ektasoftwares.com)
UserMgmt is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
UserMgmt is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
function UsermgmtInIt(&$controller) {
/*
setting default time zone for your site
*/
date_default_timezone_set ("America/New_York");
App::import('View', 'View');
$view = new View($controller);
$html = $view->loadHelper('Html');
/*
setting site url
do not edit it
if you want to edit then for example
define("SITE_URL", "http://example.com/");
*/
define("SITE_URL", $html->url('/', true));
/*
set true if new registrations are allowed
*/
define("siteRegistration", true);
/*
set true if you want send registration mail to user
*/
define("sendRegistrationMail", true);
/*
set true if you want verify user's email id, site will send email confirmation link to user's email id
sett false you do not want verify user's email id, in this case user becomes active after registration with out email verification
*/
define("emailVerification", true);
/*
set email address for sending emails
*/
define("emailFromAddress", 'example@example.com');
/*
set site name for sending emails
*/
define("emailFromName", 'User Management Plugin');
/*
set login redirect url, it means when user gets logged in then site will redirect to this url.
*/
define("loginRedirectUrl", '/dashboard');
/*
set logout redirect url, it means when user gets logged out then site will redirect to this url.
*/
define("logoutRedirectUrl", '/login');
/*
set true if you want to enable permissions on your site
*/
define("PERMISSIONS", true);
/*
set true if you want to check permissions for admin also
*/
define("ADMIN_PERMISSIONS", false);
/*
set default group id here for registration
*/
define("defaultGroupId", 2);
/*
set Admin group id here
*/
define("ADMIN_GROUP_ID", 1);
/*
set Guest group id here
*/
define("GUEST_GROUP_ID", 3);
Cache::config('UserMgmt', array(
'engine' => 'File',
'duration'=> '+3 months',
'path' => CACHE,
'prefix' => 'UserMgmt_'
));
}