Last active
August 29, 2015 14:06
-
-
Save hissy/dfe3a512a744318da850 to your computer and use it in GitHub Desktop.
[concrete5] Force SSL when user is logged in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add below codes into config/site.php | |
// If User is logged in | |
if (isset($_SESSION['uID']) && $_SESSION['uID'] > 0 && isset($_SESSION['uName']) && $_SESSION['uName'] != '') { | |
define('BASE_URL', 'https://example.com'); | |
} else { | |
define('BASE_URL', 'http://example.com'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment