Hi @patrick, thanks
I did some similar
<?php
function user_store_username(){
if(osc_is_web_user_logged_in() == true){
if(Session::newInstance()->_get('logged-username') == ''){
header('Location: ' . osc_base_url(true).'?page=user&action=pub_profile&id='. osc_logged_user_id());
Session::newInstance()->_set('logged-username', osc_user_username());
}
}
}
osc_add_hook('header', 'user_store_username');
function user_get_logged_username(){
return Session::newInstance()->_get('logged-username');
}
I not tried you code yet, because I saw it now. Anyway, I see a variable not defined "$redirect". I think you put here something already done for you (copy/paste)... sorry if not was the case. Anyway I will see better your code soon.
Thank you