[eluser]TheFuzzy0ne[/eluser]
Yes. Current URL pretty much returns the following:
The URL of your site as written for base_url in your config.php
the index.php page (often set to '' to hide it).
The URI as it is in your address bar.
I think you just need to override the function so that it actually returns the current URL (which can be spoofed), or at least changes the http:// to https:// when it should.
EDIT: I've probably got the numbers wrong in the calls to substr, but this code might do it.
./system/application/helpers/MY_url_helper.php
Code:
function current_url()
{
$CI =& get_instance();
$url = $CI->config->site_url($CI->uri->uri_string());
if ($_SERVER['SERVER_PORT'] == 443)
{
$url = substr($url, 0, 4).'s'.substr($url, 4);
}
return $url;
}