use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
-use Friendica\Module\Register;
+use Friendica\Module;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Security\TwoFactor\Model\AppSpecificPassword;
use Friendica\Network\HTTPException;
* Empties the password reset token field just in case.
*
* @param int $uid
- * @param string $pasword_hashed
+ * @param string $password_hashed
* @return bool
* @throws Exception
*/
- private static function updatePasswordHashed(int $uid, string $pasword_hashed): bool
+ private static function updatePasswordHashed(int $uid, string $password_hashed): bool
{
$fields = [
- 'password' => $pasword_hashed,
+ 'password' => $password_hashed,
'pwdreset' => null,
'pwdreset_time' => null,
'legacy_password' => false
* Checks if a nickname is in the list of the forbidden nicknames
*
* Check if a nickname is forbidden from registration on the node by the
- * admin. Forbidden nicknames (e.g. role namess) can be configured in the
+ * admin. Forbidden nicknames (e.g. role names) can be configured in the
* admin panel.
*
* @param string $nickname The nickname that should be checked
$resource_id = Photo::newResource();
- // Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translateble string
+ // Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translatable string
$profile_album = DI::l10n()->t('Profile Photos');
$r = Photo::store($image, $uid, 0, $resource_id, $filename, $profile_album, 4);
* permanently against re-registration, as the person was not yet
* allowed to have friends on this system
*
- * @return bool True, if the deny was successfull
+ * @return bool True, if the deny was successful
* @throws Exception
*/
public static function deny(string $hash): bool
*
* @param int $start Start count (Default is 0)
* @param int $count Count of the items per page (Default is @see Pager::ITEMS_PER_PAGE)
- * @param string $type The type of users, which should get (all, bocked, removed)
+ * @param string $type The type of users, which should get (all, blocked, removed)
* @param string $order Order of the user list (Default is 'contact.name')
* @param bool $descending Order direction (Default is ascending)
* @return array|bool The list of the users
}
$register_policy = DI::config()->get('config', 'register_policy');
- if (!in_array($register_policy, [Register::OPEN, Register::CLOSED])) {
+ if (!in_array($register_policy, [Module\Register::OPEN, Module\Register::CLOSED])) {
Logger::debug('Unsupported register policy.', ['policy' => $register_policy]);
return;
}
$users = DBA::count('user', ['blocked' => false, 'account_removed' => false, 'account_expired' => false]);
- if (($users >= $max_registered_users) && ($register_policy == Register::OPEN)) {
- DI::config()->set('config', 'register_policy', Register::CLOSED);
+ if (($users >= $max_registered_users) && ($register_policy == Module\Register::OPEN)) {
+ DI::config()->set('config', 'register_policy', Module\Register::CLOSED);
Logger::notice('Max users reached, registration is closed.', ['users' => $users, 'max' => $max_registered_users]);
- } elseif (($users < $max_registered_users) && ($register_policy == Register::CLOSED)) {
- DI::config()->set('config', 'register_policy', Register::OPEN);
+ } elseif (($users < $max_registered_users) && ($register_policy == Module\Register::CLOSED)) {
+ DI::config()->set('config', 'register_policy', Module\Register::OPEN);
Logger::notice('Below maximum users, registration is opened.', ['users' => $users, 'max' => $max_registered_users]);
} else {
Logger::debug('Unchanged register policy', ['policy' => $register_policy, 'users' => $users, 'max' => $max_registered_users]);