matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 1 | <?php |
| 2 | // Service base url |
| 3 | $BASE_URL = "https://example.com/signup"; |
| 4 | |
matheusfillipe | 47cf90b | 2021-05-13 03:36:21 -0300 | [diff] [blame] | 5 | // Language country code. The default language to look for. Leave empty for the default html folder |
| 6 | $LANG_CC = ""; |
| 7 | |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 8 | // 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 Kupietz | 92e4866 | 2023-02-23 10:04:21 +0100 | [diff] [blame] | 14 | $ENCRYPT_PASSWORDS = false; |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 15 | |
Marc Kupietz | 97afde4 | 2023-03-04 14:12:46 +0100 | [diff] [blame] | 16 | $SERVICE_ACRONYM = "Test Service"; |
Marc Kupietz | 0be2b46 | 2023-03-08 09:29:11 +0100 | [diff] [blame] | 17 | #$CONFERENCE_REGISTRATION = true; |
Marc Kupietz | f46948e | 2023-03-28 15:01:19 +0200 | [diff] [blame^] | 18 | |
| 19 | $SERVICE_URL = "https://www.example.org"; |
Marc Kupietz | 0be2b46 | 2023-03-08 09:29:11 +0100 | [diff] [blame] | 20 | $SERVICE_LOGO = "./static/Test_Logo.svg"; |
| 21 | $SERVICE_NAME = "International Test Corpus"; |
| 22 | |
| 23 | $REGULAR_CONFERENCE_FEE = 280; |
| 24 | $EARLYBIRD_CONFERENCE_FEE = 240; |
| 25 | $CONFERENCE_DINNER = 60; |
| 26 | $STUDENT_DISCOUNT = 80; |
| 27 | $EARLYBIRD_DEADLINE = "15 May 2023"; // HAWAIAN TIME (HST) is used :) |
Marc Kupietz | 9ab8c8f | 2023-02-23 12:14:33 +0100 | [diff] [blame] | 28 | |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 29 | // Redis password |
| 30 | $REDIS_PASS = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; |
| 31 | |
| 32 | // Mail |
| 33 | $SMTP = (object)[ |
| 34 | "from" => 'frommail@mail.com', |
| 35 | 'host' => 'tls://mail.com', |
| 36 | 'port' => '465', |
| 37 | 'username' => 'frommail@mail.com', |
| 38 | 'password' => 'xxxxxxxxx' |
| 39 | ]; |
| 40 | $FALLBACK_SMTP = (object)[ |
| 41 | "from" => 'another@gmail.com', |
| 42 | 'host' => 'tls://gmail.com', |
| 43 | 'port' => '465', |
| 44 | 'username' => 'signup@gmail.com', |
| 45 | 'password' => 'xxxxxxxxxx' |
| 46 | ]; |
Marc Kupietz | 641b32a | 2023-03-04 19:55:56 +0100 | [diff] [blame] | 47 | // $MAIL_CC = "ccme@example.org"; // optionally CC all mails |
| 48 | // $MAIL_BCC = "bccme@example.org"; // optionally BCC all mails |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 49 | |
| 50 | // User Validation |
| 51 | $VAL_USER = (object)[ |
| 52 | "min_username" => 5, |
| 53 | "max_username" => 32, |
| 54 | "min_first_name" => 3, |
| 55 | "max_first_name" => 32, |
| 56 | "min_last_name" => 3, |
| 57 | "max_last_name" => 32, |
| 58 | "min_password" => 8, |
| 59 | "max_password" => 128 |
| 60 | ]; |
| 61 | $CAPTCHA_LENGTH = 5; |
| 62 | |
matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame] | 63 | // Use unsafe but easier captcha (no ocr testing) |
| 64 | $SIMPLECAPTCHA = false; |
| 65 | |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 66 | // not accept emails from |
| 67 | $MAIL_HOST_BLACKLIST = ["mailinator.com"]; |
| 68 | // Use fallback_smtp directly for these hosts |
| 69 | $MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"]; |
| 70 | |
| 71 | // Max registrations from one ip per hour |
| 72 | $HOURLY_REGISTRATIONS = 3; |
| 73 | |
| 74 | // Max Captcha requests for one ip per hour |
| 75 | $HOURLY_CAPTCHAS = 15; |
| 76 | |
| 77 | // Expiration delay for mail confirmation in seconds. After this time the email |
| 78 | // confirmation link will say 'token expired' |
| 79 | $MAIL_CONFIRMATION_AWAIT_DELAY = 3600; |
| 80 | |
| 81 | // CONFIRMATION EMAIL TEMPLATE |
| 82 | // text is the version for mail clients that don't support html |
| 83 | // html is the version with html support |
matheusfillipe | f43dd96 | 2021-05-13 23:27:01 -0300 | [diff] [blame] | 84 | // You can create templaets for different languages under |
| 85 | // templates_cc/email.php |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 86 | $MAIL_TEMPLATE = (object)[ |
| 87 | "subject" => "Confirm your email", |
| 88 | "text" => "To complete your registration please paste this to your browser: {{url}}", |
| 89 | "html" => "<html><body> |
| 90 | <h2>Almost there! Click on the link bellow to confirm your email address</h2> |
| 91 | <a href='{{url}}'>Confirm</a> |
| 92 | </body></html>" |
| 93 | ]; |
| 94 | |
Matheus Fillipe | 301684b | 2021-05-14 09:09:43 +0300 | [diff] [blame] | 95 | $RECOVERY_EMAIL_TEMPLATE = (object)[ |
| 96 | "subject" => "Change your password!", |
| 97 | "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}}", |
| 98 | "html" => "<html><body> |
| 99 | <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> |
| 100 | <a href='{{url}}'>Click here</a> to change your password |
| 101 | </body></html>" |
| 102 | ]; |
| 103 | |
| 104 | |
| 105 | $PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[ |
| 106 | "subject" => "Your password was changed", |
| 107 | "text" => "Your password was chanegd successfully. If this wasn't you please contact support", |
| 108 | "html" => "<html><body> |
| 109 | <h3>Your password was chanegd successfully. If this wasn't you please contact support</h3> |
| 110 | </body></html>" |
| 111 | ]; |
| 112 | |
matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame] | 113 | // url to redirect to after mail confirmation. It will be 5 seconds of delay. Leave empty to none |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 114 | $REDIRECT_TO = ""; |
| 115 | |
Matheus Fillipe | 5ad0cd5 | 2022-05-05 06:10:41 +0300 | [diff] [blame] | 116 | // Registration callback. A function to run when registration is successfull |
Matheus Fillipe | 773eafa | 2022-05-05 06:15:47 +0300 | [diff] [blame] | 117 | $POST_REGISTER_HOOK = function($user){ |
| 118 | echo "Welcome " . $user->name . "! Your ip is logged: " . $_SERVER['REMOTE_ADDR']; |
Matheus Fillipe | 5ad0cd5 | 2022-05-05 06:10:41 +0300 | [diff] [blame] | 119 | }; |
| 120 | |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 121 | // displays php errors on the html page. Set to false for production |
| 122 | $DEBUG = false; |