I write a module, which should behave in them same manner as inline translation:
If I am admin and I am logged in, I can see something special on frontend. But if I am not admin, then I can't see anything.
How to let module know that on frontend area admin is logged in?
UPDATE 1
To clarify things I want to describe a little bit my modules behaviour:
Backend - form which simply saves to config one value.
Frontend - Observer, which is hooking to an event. In Observer's function I need to check if
current frontend user is logged into adminpanel, in another words user watching frontend is admin .
Because with this check I want to provide to admin user some functionality based on frontend changing.
UPDATE 2
The thing is that I have following session($_SESSION) dump on frontend:
[core] => Array
(
[_session_validator_data] => Array
(
[remote_addr] => ...
[http_via] =>
[http_x_forwarded_for] =>
[http_user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
)
[session_hosts] => Array
(
[...] => 1
)
[messages] => Mage_Core_Model_Message_Collection Object
(
[_messages:protected] => Array
(
)
[_lastAddedMessage:protected] =>
)
[just_voted_poll] =>
[visitor_data] => Array
(
[] =>
[server_addr] => ...
[remote_addr] => ...
[http_secure] =>
[http_host] => ...
[http_user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
[http_accept_language] => ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
[http_accept_charset] => windows-1251,utf-8;q=0.7,*;q=0.7
[request_uri] => ...
[session_id] => bb397df22a3410ccb07e567cb0333985
[http_referer] => ...
[first_visit_at] => 2011-12-01 09:17:48
[is_new_visitor] =>
[last_visit_at] => 2011-12-01 13:21:38
[visitor_id] => 1536
[last_url_id] => 2408
)
[last_url] => ...
)
[admin] => Array
(
[_session_validator_data] => Array
(
[remote_addr] => ...
[http_via] =>
[http_x_forwarded_for] =>
[http_user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
)
[session_hosts] => Array
(
[...] => 1
)
)
[adminhtml] => Array
(
[_session_validator_data] => Array
(
[remote_addr] => ...
[http_via] =>
[http_x_forwarded_for] =>
[http_user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
)
[session_hosts] => Array
(
[...] => 1
)
)
Perhaps there is no way to access admin users from frontend. Well I try via Cookies.