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 | |
| 44 | // not accept emails from |
| 45 | $MAIL_HOST_BLACKLIST = ["mailinator.com"]; |
| 46 | // Use fallback_smtp directly for these hosts |
| 47 | $MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"]; |
| 48 | |
| 49 | // Max registrations from one ip per hour |
| 50 | $HOURLY_REGISTRATIONS = 3; |
| 51 | |
| 52 | // Max Captcha requests for one ip per hour |
| 53 | $HOURLY_CAPTCHAS = 15; |
| 54 | |
| 55 | // Expiration delay for mail confirmation in seconds. After this time the email |
| 56 | // confirmation link will say 'token expired' |
| 57 | $MAIL_CONFIRMATION_AWAIT_DELAY = 3600; |
| 58 | |
| 59 | // CONFIRMATION EMAIL TEMPLATE |
| 60 | // text is the version for mail clients that don't support html |
| 61 | // html is the version with html support |
| 62 | $MAIL_TEMPLATE = (object)[ |
| 63 | "subject" => "Confirm your email", |
| 64 | "text" => "To complete your registration please paste this to your browser: {{url}}", |
| 65 | "html" => "<html><body> |
| 66 | <h2>Almost there! Click on the link bellow to confirm your email address</h2> |
| 67 | <a href='{{url}}'>Confirm</a> |
| 68 | </body></html>" |
| 69 | ]; |
| 70 | |
| 71 | // url to redirect to after mail confirmation. Leave empty to none |
| 72 | $REDIRECT_TO = ""; |
| 73 | |
| 74 | // displays php errors on the html page. Set to false for production |
| 75 | $DEBUG = false; |
| 76 | ?> |