How do I limit access to a page node? I'd like only registered users to be able to visit the page. Also, is there a way to get the user's id and name from within a page? Sorry for the Drupal 101 questions - I'm new.

Comments

tomski777’s picture

Welcome to Drupal savnet - I'm sure you'll find theres much fun to be had:)

RE:How do I limit access to a page node?
http://drupal.org/project/simple_access
will sort you out, i find this module really easy to use & more importantly, my clients do as well...

RE: user's id and name from within a page
I'm not sure what you mean by this but the following will print the current username & ID to a page if a user is logged in:

<?php
global $user;
if(!$user->uid){
     print "User not logged in";
}else{
     print "User ID:".$user->uid."| User Name:".$user->name ;
}
?>

><>tomskii
><>www.mutinyarts.co.uk

karldied’s picture

Another excellent tool is taxonomy_access module. I put a long post at http://drupal.org/node/45512#comment-190669 (The first post covered getting the UID and name.) -karldied