The Toolkit for Online Communities
18823 Community Members, 0 members online, 1900 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Retrieve object_id of System Owner? : One Message

Forum OpenACS Q&A: Re: Retrieve object_id of System Owner?

Posted by Randy O'Meara on
Jeff, the following works but I'm not using it any longer. I solved my problem by removing the grant call.


ad_proc -private admin_user_id_get {} {

    Return the user_id (object_id) of the System Owner account.
    May be able to simplify and streamline the query used to 
    retrieve this info if bootstrap-installer patched to save
    this user_id in the acs_magic_objects table.

    @see http://openacs.org/forums/message-view?message_id=118128
} {
    return [db_string admin_user_id {
      from users u, acs_permissions_all p, acs_magic_objects a
      where u.user_id = p.grantee_id
      and p.object_id = a.object_id
      and a.name = 'default_context'