login-as to support more than 1 level down (SKINS)

Version 1.41


If you're logged in as an Admin, then login as a Reseller, and then try to login as a User (below Reseller), it would previously just stay at the Reseller login. This is because the session holds the admin password, not the reseller password, so when reseller|user is used in the form, the password match fails. The simple solution is to change the form from using: reseller|user (when logged in as the reseller) to show: admin|user instead, even though we're logged in as "reseller" (via the login-as from admin). This forces a password lookup on admin, which is the value in the session file, so it then works correctly. Note that when "Logout" is clicked, it will drop straight to admin, and not reseller. SKINS: reseller/show_user.html admin/show_reseller.html change: <input type=hidden name=username value="|USERNAME|||user|"> to be: <input type=hidden name=username value="|LOGIN_AS_MASTER_NAME|||user|">

Interested to try DirectAdmin? Get a 30-day Free Trial!