OCC is short for OwnCloud Console. It’s the command-line interface for Nextcloud, and it lets you do many things that there might not be buttons for in the web interface.
In this case, Reiner_Nippes was suggesting to use the occ app:disable command to disable the apps in question, but there is also a button for that in the ‘Apps’ page on the web.
So I don’t have ssh access to the server, it’s hosted outside our network, I assume that command is ran via ssh : user:resetpassword (Resets the password of the named user)
I do understand that email is insecure but it will be like a once off and the user must click “set password” as in the link / image attached earlier. I want to make it as simple as possible of users to do this, below is a sample of the code:
$emailTemplate->addBodyText($l10n->t(‘Your username is: %s’, [$userId]));
if ($generatePasswordResetToken) {
$leftButtonText = $l10n->t(‘Set your password’);
} else {
$leftButtonText = $l10n->t(‘Client Portal’, [$this->themingDefaults->getName()]);
}
$emailTemplate->addBodyButtonGroup(
$leftButtonText,
$link,
$l10n->t(‘Set Password’),
‘http://subdomain.domain.tld/index.php/login?clear=1’
);
$emailTemplate->addFooter();
I just tested this on my Nextcloud Dev system. I added a user and only entered a username, display name and the email address but left the password field empty.
When I click on “Set your password” I will be redirected to my Nextcloud Dev page and have to enter a password and can than login with the username and the set password.
I totally agree with @Reiner_Nippes on the insecure part of sending passwords via email and many services nowadays do too, as they send you links if you want to reset your password, instead of a full text password.
As for the SSH / OCC part, there was/is an app called “OCC Web” for people, who don’t have access to SSH. This app is currently however only compatible with NC 15 and has not been updated to be compatible with NC 16. If you are able to install a NC testing system alongside your productive system, you could install that app and test it on there, to make sure your required commands work.