diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 9feef60ee..731d0c365 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -470,6 +470,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($this->params['user']->isAdmin()) {
$showdivider = true;
echo " params['settings']->_httpRoot."out/out.SubstituteUser.php\">".getMLText("substitute_user")."\n";
+ } elseif($substitutes = $this->params['user']->getReverseSubstitutes()) {
+ if(count($substitutes) == 1) {
+ echo " params['settings']->_httpRoot."op/op.SubstituteUser.php?userid=".$substitutes[0]->getID()."&formtoken=".createFormKey('substituteuser')."\">".getMLText("substitute_to_user", array('username'=>$substitutes[0]->getFullName()))."\n";
+ } else {
+ echo " params['settings']->_httpRoot."out/out.SubstituteUser.php\">".getMLText("substitute_user")."\n";
+ }
}
}
if($showdivider)