Why not have a "My Page" menu item?
Registered users when logged in can view their own page.
Implementation:
1. Select no user in the menu item
2. Change the logic slightly in components/com_k2/views/itemlist/view.html.php
where you have
case 'user':
//Get user
$id = JRequest::getInt('id');
$user = &JFactory::getUser($id);
change this to
//Get user
$id = JRequest::getInt('id');
// gwe mod
if ($id>0) $user = &JFactory::getUser($id);
else {
$user = &JFactory::getUser();
if ($user->id==0) {
JError::raiseError(404, JText::_('Please log in'));
}
JRequest::setVar('id', $user->id);
}
// end gwe mod
and hey presto
Registered users when logged in can view their own page.
Implementation:
1. Select no user in the menu item
2. Change the logic slightly in components/com_k2/views/itemlist/view.html.php
where you have
case 'user':
//Get user
$id = JRequest::getInt('id');
$user = &JFactory::getUser($id);
change this to
//Get user
$id = JRequest::getInt('id');
// gwe mod
if ($id>0) $user = &JFactory::getUser($id);
else {
$user = &JFactory::getUser();
if ($user->id==0) {
JError::raiseError(404, JText::_('Please log in'));
}
JRequest::setVar('id', $user->id);
}
// end gwe mod
and hey presto