Hide User 1 Profile (Administrator Profile) from other users
nikmahajan - September 3, 2009 - 14:57
Sorry for asking a question which should be asked by naive drupal users actually but I am seriously not getting on to restricting other users from viewing administrator profile page or User 1 profile page.
I just failed to figure out how to do this.Would be thankful if someone can help me regarding the situation.

Search is your friend
I just did one simple search and found many references with valuable information. You should look through those posts. The information isn't all in one place, but you can piece the various parts of it together.
There's even a Documentation page at http://drupal.org/node/45873 that talks about this.
Please note that since this is not a feature of Drupal core, some of the solutions involve hacking core files. This is not recommended as updates and upgrades will break this.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
thanks for the information
thanks for the information but that one is intended for Drupal 4.x only. I am using Drupal 6.x and I need a support regarding that. BTW, I did lot of search through drupal forums and documentation but couldn't find the solution. That's why I am asking it here.
You'll have to piece it
You'll have to piece it together. The information provided, even for older versions, still tends to apply, or provide the information needed to figure it out in the newer code base.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
I think this is what you need
For drupal 6:
in profile_pages.inc (in modules/profile/)find:
$result = pager_query('SELECT uid, access FROM {users} WHERE uid > 0 AND status != 0 AND access != 0 ORDER BY access DESC', 20, 0, NULL);
It's in the function "profile_browse" and on line 503 in drupal 5.2.
Change it to:
$result = pager_query('SELECT uid, access FROM {users} WHERE uid > 1 AND status != 0 AND access != 0 ORDER BY access DESC', 20, 0, NULL);
worked for me!
see: http://drupal.org/node/154404
I recommend module User One
I recommend quite new module User One
http://drupal.org/project/userone
You can prevent see the user 1 profile by others users.