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 | |
| 5 | // Ldap server |
| 6 | $HOST = 'localhost'; |
| 7 | $PORT = 389; |
| 8 | $USER = "admin"; |
| 9 | $PASSWORD = "myldappassword"; |
| 10 | $BASE_DN = 'cn={},ou=organization,dc=example,dc=com'; |
| 11 | |
| 12 | // Redis password |
| 13 | $REDIS_PASS = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; |
| 14 | |
| 15 | // Mail |
| 16 | $SMTP = (object)[ |
| 17 | "from" => 'frommail@mail.com', |
| 18 | 'host' => 'tls://mail.com', |
| 19 | 'port' => '465', |
| 20 | 'username' => 'frommail@mail.com', |
| 21 | 'password' => 'xxxxxxxxx' |
| 22 | ]; |
| 23 | $FALLBACK_SMTP = (object)[ |
| 24 | "from" => 'another@gmail.com', |
| 25 | 'host' => 'tls://gmail.com', |
| 26 | 'port' => '465', |
| 27 | 'username' => 'signup@gmail.com', |
| 28 | 'password' => 'xxxxxxxxxx' |
| 29 | ]; |
| 30 | |
| 31 | // User Validation |
| 32 | $VAL_USER = (object)[ |
| 33 | "min_username" => 5, |
| 34 | "max_username" => 32, |
| 35 | "min_first_name" => 3, |
| 36 | "max_first_name" => 32, |
| 37 | "min_last_name" => 3, |
| 38 | "max_last_name" => 32, |
| 39 | "min_password" => 8, |
| 40 | "max_password" => 128 |
| 41 | ]; |
| 42 | $CAPTCHA_LENGTH = 5; |
| 43 | |
matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame^] | 44 | // Use unsafe but easier captcha (no ocr testing) |
| 45 | $SIMPLECAPTCHA = false; |
| 46 | |
matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 47 | // not accept emails from |
| 48 | $MAIL_HOST_BLACKLIST = ["mailinator.com"]; |
| 49 | // Use fallback_smtp directly for these hosts |
| 50 | $MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"]; |
| 51 | |
| 52 | // Max registrations from one ip per hour |
| 53 | $HOURLY_REGISTRATIONS = 3; |
| 54 | |
| 55 | // Max Captcha requests for one ip per hour |
| 56 | $HOURLY_CAPTCHAS = 15; |
| 57 | |
| 58 | // Expiration delay for mail confirmation in seconds. After this time the email |
| 59 | // confirmation link will say 'token expired' |
| 60 | $MAIL_CONFIRMATION_AWAIT_DELAY = 3600; |
| 61 | |
| 62 | // CONFIRMATION EMAIL TEMPLATE |
| 63 | // text is the version for mail clients that don't support html |
| 64 | // html is the version with html support |
| 65 | $MAIL_TEMPLATE = (object)[ |
| 66 | "subject" => "Confirm your email", |
| 67 | "text" => "To complete your registration please paste this to your browser: {{url}}", |
| 68 | "html" => "<html><body> |
| 69 | <h2>Almost there! Click on the link bellow to confirm your email address</h2> |
| 70 | <a href='{{url}}'>Confirm</a> |
| 71 | </body></html>" |
| 72 | ]; |
| 73 | |
matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame^] | 74 | // 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] | 75 | $REDIRECT_TO = ""; |
| 76 | |
| 77 | // displays php errors on the html page. Set to false for production |
| 78 | $DEBUG = false; |
| 79 | ?> |