blob: db94b43beef51907193d2444d96ad602890b2249 [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';
Marc Kupietz92e48662023-02-23 10:04:21 +010014$ENCRYPT_PASSWORDS = false;
matheusfillipeabd513e2021-05-11 03:29:11 -030015
Marc Kupietz97afde42023-03-04 14:12:46 +010016$SERVICE_ACRONYM = "Test Service";
Marc Kupietz9ab8c8f2023-02-23 12:14:33 +010017
matheusfillipeabd513e2021-05-11 03:29:11 -030018// Redis password
19$REDIS_PASS = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
20
21// Mail
22$SMTP = (object)[
23 "from" => 'frommail@mail.com',
24 'host' => 'tls://mail.com',
25 'port' => '465',
26 'username' => 'frommail@mail.com',
27 'password' => 'xxxxxxxxx'
28];
29$FALLBACK_SMTP = (object)[
30 "from" => 'another@gmail.com',
31 'host' => 'tls://gmail.com',
32 'port' => '465',
33 'username' => 'signup@gmail.com',
34 'password' => 'xxxxxxxxxx'
35];
Marc Kupietz641b32a2023-03-04 19:55:56 +010036// $MAIL_CC = "ccme@example.org"; // optionally CC all mails
37// $MAIL_BCC = "bccme@example.org"; // optionally BCC all mails
matheusfillipeabd513e2021-05-11 03:29:11 -030038
39// User Validation
40$VAL_USER = (object)[
41 "min_username" => 5,
42 "max_username" => 32,
43 "min_first_name" => 3,
44 "max_first_name" => 32,
45 "min_last_name" => 3,
46 "max_last_name" => 32,
47 "min_password" => 8,
48 "max_password" => 128
49];
50$CAPTCHA_LENGTH = 5;
51
matheusfillipe38706ea2021-05-12 02:45:42 -030052// Use unsafe but easier captcha (no ocr testing)
53$SIMPLECAPTCHA = false;
54
matheusfillipeabd513e2021-05-11 03:29:11 -030055// not accept emails from
56$MAIL_HOST_BLACKLIST = ["mailinator.com"];
57// Use fallback_smtp directly for these hosts
58$MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"];
59
60// Max registrations from one ip per hour
61$HOURLY_REGISTRATIONS = 3;
62
63// Max Captcha requests for one ip per hour
64$HOURLY_CAPTCHAS = 15;
65
66// Expiration delay for mail confirmation in seconds. After this time the email
67// confirmation link will say 'token expired'
68$MAIL_CONFIRMATION_AWAIT_DELAY = 3600;
69
70// CONFIRMATION EMAIL TEMPLATE
71// text is the version for mail clients that don't support html
72// html is the version with html support
matheusfillipef43dd962021-05-13 23:27:01 -030073// You can create templaets for different languages under
74// templates_cc/email.php
matheusfillipeabd513e2021-05-11 03:29:11 -030075$MAIL_TEMPLATE = (object)[
76 "subject" => "Confirm your email",
77 "text" => "To complete your registration please paste this to your browser: {{url}}",
78 "html" => "<html><body>
79 <h2>Almost there! Click on the link bellow to confirm your email address</h2>
80 <a href='{{url}}'>Confirm</a>
81 </body></html>"
82];
83
Matheus Fillipe301684b2021-05-14 09:09:43 +030084$RECOVERY_EMAIL_TEMPLATE = (object)[
85 "subject" => "Change your password!",
86 "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}}",
87 "html" => "<html><body>
88 <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>
89 <a href='{{url}}'>Click here</a> to change your password
90 </body></html>"
91];
92
93
94$PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[
95 "subject" => "Your password was changed",
96 "text" => "Your password was chanegd successfully. If this wasn't you please contact support",
97 "html" => "<html><body>
98 <h3>Your password was chanegd successfully. If this wasn't you please contact support</h3>
99 </body></html>"
100];
101
matheusfillipe38706ea2021-05-12 02:45:42 -0300102// url to redirect to after mail confirmation. It will be 5 seconds of delay. Leave empty to none
matheusfillipeabd513e2021-05-11 03:29:11 -0300103$REDIRECT_TO = "";
104
Matheus Fillipe5ad0cd52022-05-05 06:10:41 +0300105// Registration callback. A function to run when registration is successfull
Matheus Fillipe773eafa2022-05-05 06:15:47 +0300106$POST_REGISTER_HOOK = function($user){
107 echo "Welcome " . $user->name . "! Your ip is logged: " . $_SERVER['REMOTE_ADDR'];
Matheus Fillipe5ad0cd52022-05-05 06:10:41 +0300108};
109
matheusfillipeabd513e2021-05-11 03:29:11 -0300110// displays php errors on the html page. Set to false for production
111$DEBUG = false;