Open Source Content Management Framework

mgd_unsetuid

  1. Description

mgd_unsetuid -- Return authentication credentials to initial state

Description

`bool **mgd_unsetuid** (void)`

Minimum version: Midgard 1.4 (Bifrost)

When called the authentication credentials will be set to the state mod_midgard initially set them to. You can use this to temporarily become another user by calling mgd_auth_midgard, then mgd_unsetuid. Note that this is not a general 'undo' feature for mgd_auth_midgard since it sets the credentials to the initial state no matter how many times mgd_auth_midgard was called.

This function will return false if mgd_auth_midgard() has not been called.

Warning

You must refresh Midgard's internal authentication cache after mgd_unsetuid() by calling mgd_get_midgard().

Designed by Nemein, hosted by Anykey