blob: 037df68370882b4ad3a679a1e2486c2b02b8301c [file] [log] [blame]
matheusfillipeabd513e2021-05-11 03:29:11 -03001<?php
2// Service base url
3$BASE_URL = "https://example.com/signup";
4
matheusfillipe47cf90b2021-05-13 03:36:21 -03005// Language country code. The default language to look for. Leave empty for the default html folder
6$LANG_CC = "";
7
matheusfillipeabd513e2021-05-11 03:29:11 -03008// Ldap server
9$HOST = 'localhost';
10$PORT = 389;
11$USER = "admin";
12$PASSWORD = "myldappassword";
13$BASE_DN = 'cn={},ou=organization,dc=example,dc=com';
14
15// Redis password
16$REDIS_PASS = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
17
18// Mail
19$SMTP = (object)[
20 "from" => 'frommail@mail.com',
21 'host' => 'tls://mail.com',
22 'port' => '465',
23 'username' => 'frommail@mail.com',
24 'password' => 'xxxxxxxxx'
25];
26$FALLBACK_SMTP = (object)[
27 "from" => 'another@gmail.com',
28 'host' => 'tls://gmail.com',
29 'port' => '465',
30 'username' => 'signup@gmail.com',
31 'password' => 'xxxxxxxxxx'
32];
33
34// User Validation
35$VAL_USER = (object)[
36 "min_username" => 5,
37 "max_username" => 32,
38 "min_first_name" => 3,
39 "max_first_name" => 32,
40 "min_last_name" => 3,
41 "max_last_name" => 32,
42 "min_password" => 8,
43 "max_password" => 128
44];
45$CAPTCHA_LENGTH = 5;
46
matheusfillipe38706ea2021-05-12 02:45:42 -030047// Use unsafe but easier captcha (no ocr testing)
48$SIMPLECAPTCHA = false;
49
matheusfillipeabd513e2021-05-11 03:29:11 -030050// not accept emails from
51$MAIL_HOST_BLACKLIST = ["mailinator.com"];
52// Use fallback_smtp directly for these hosts
53$MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"];
54
55// Max registrations from one ip per hour
56$HOURLY_REGISTRATIONS = 3;
57
58// Max Captcha requests for one ip per hour
59$HOURLY_CAPTCHAS = 15;
60
61// Expiration delay for mail confirmation in seconds. After this time the email
62// confirmation link will say 'token expired'
63$MAIL_CONFIRMATION_AWAIT_DELAY = 3600;
64
65// CONFIRMATION EMAIL TEMPLATE
66// text is the version for mail clients that don't support html
67// html is the version with html support
matheusfillipef43dd962021-05-13 23:27:01 -030068// You can create templaets for different languages under
69// templates_cc/email.php
matheusfillipeabd513e2021-05-11 03:29:11 -030070$MAIL_TEMPLATE = (object)[
71 "subject" => "Confirm your email",
72 "text" => "To complete your registration please paste this to your browser: {{url}}",
73 "html" => "<html><body>
74 <h2>Almost there! Click on the link bellow to confirm your email address</h2>
75 <a href='{{url}}'>Confirm</a>
76 </body></html>"
77];
78
Matheus Fillipe301684b2021-05-14 09:09:43 +030079$RECOVERY_EMAIL_TEMPLATE = (object)[
80 "subject" => "Change your password!",
81 "text" => "Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password: {{url}}",
82 "html" => "<html><body>
83 <h3>Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password</h3>
84 <a href='{{url}}'>Click here</a> to change your password
85 </body></html>"
86];
87
88
89$PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[
90 "subject" => "Your password was changed",
91 "text" => "Your password was chanegd successfully. If this wasn't you please contact support",
92 "html" => "<html><body>
93 <h3>Your password was chanegd successfully. If this wasn't you please contact support</h3>
94 </body></html>"
95];
96
matheusfillipe38706ea2021-05-12 02:45:42 -030097// url to redirect to after mail confirmation. It will be 5 seconds of delay. Leave empty to none
matheusfillipeabd513e2021-05-11 03:29:11 -030098$REDIRECT_TO = "";
99
Matheus Fillipe5ad0cd52022-05-05 06:10:41 +0300100// Registration callback. A function to run when registration is successfull
101$POST_REGISTER_HOOK = function(){
102 echo "THE IP: " . $_SERVER['REMOTE_ADDR'];
103};
104
matheusfillipeabd513e2021-05-11 03:29:11 -0300105// displays php errors on the html page. Set to false for production
106$DEBUG = false;