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.

} {
    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 = 'default_context'