$_ENV['SESSION_SELECTED_DOMAIN'] - Not working correctly

Desavil

Verified User
Joined
Jan 6, 2016
Messages
20
Hello,

I need to get the name of the currently selected domain in the plugin.
So far I have been using the $_ENV['SESSION_SELECTED_DOMAIN'] variable. My plugin is written in PHP.

Previously, it worked well. It hasn't worked since either of the last DirectAdmin updates this year (I can't pinpoint which one, unfortunately).
Currently, the variable displays the name of the default domain all the time.

Has anything changed? How can I get the name of the currently selected domain?
 
Hello,

Faced the same issue recently. It seems the variable is not set in Evolution skin. But it's working for Enhanced skin fine.

As a possible bypass is to use ?domain=|DOMAIN| in a plugin.
 
Back
Top