in the controller of the component write $user = &JFactory::getUser();
// echo "user id is ".$user->id ;
if ($user->id == 0) {
$this->setRedirect('index.php?option=com_user', 'This area is for registered users','message');
}
in any function
Subscribe to:
Post Comments (Atom)
1 comment:
That's great Basit bhai :)
Post a Comment