tuton
February 24, 2025, 11:07pm
1
Where can I switch a user’s package in HestiaCP?
I created multiple packages and assigned a user to the “Basic” package, but now I want to switch them to a different package. However, I can’t find the option. I tried clicking on the user profile, but it’s not there either.
HestiaCP 1.9.2
tuton
February 24, 2025, 11:29pm
3
I do not have that option not even in the administrator account
eris
February 24, 2025, 11:39pm
4
I have no issues with it…
if you add:
<?php var_dump($_SESSION['userContext']); ?>
In /usr/local/hestia/web/templates/pages/edit_user.php at do you see?
tuton
February 25, 2025, 11:24am
6
I have this on mine
<?php if ($_SESSION['userContext'] === 'Allywebsite') { ?>
<div class="u-mb20">
<label for="v_package" class="form-label"><?= _("Package") ?></label>
<select class="form-select" name="v_package" id="v_package" required>
<?php
foreach ($packages as $key => $value) {
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
$skey = "'".$key."'";
if (( $key == $v_package ) || ( $skey == $v_package)){
echo 'selected' ;
}
echo ">".htmlentities($key)."</option>\n";
}
?>
</select>
</div>
Where do I add this?
<?php var_dump($_SESSION['userContext']); ?>
tuton
February 25, 2025, 11:28am
7
I added it on top of the file and got this
string(5) "admin"
tuton
February 25, 2025, 11:36am
8
Changing the name from Allywebsite to Admin that works now; the package is showing in edit user.
Why I had to rename it back to admin when creating the admin account was changed to Allywebsite on installation.
eris
February 25, 2025, 1:11pm
9
tuton:
Allywebsite
It fetches the role from the user.conf so it has nothing to do with username…