apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
/**
	 * Determine whether backup codes should be active or not
	 *
	 * Backup codes only make sense if at least one 2FA provider is active,
	 * hence this method checks all enabled apps on whether they provide 2FA
	 * functionality or not. If there's at least one app, backup codes are
	 * enabled on the personal settings page.
	 *
	 * @param IUser $user
	 * @return boolean
	 */
Determine whether backup codes should be active or not
Backup codes only make sense if at least one 2FA provider is active,
hence this method checks all enabled apps on whether they provide 2FA
functionality or not. If there's at least one app, backup codes are
enabled on the personal settings page.

@param IUser $user
@return boolean
Determine whether backup codes should be active or not Backup codes only make sense if at least one 2FA provider is active hence this method checks all enabled apps on whether they provide 2FA functionality or not . If there ' s at least one app backup codes are enabled on the personal settings page . @param IUser $user @return boolean
public function isActive(IUser $user) {
		$appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function($appId) {
			return $appId !== $this->appName;
		});
		foreach ($appIds as $appId) {
			$info = $this->appManager->getAppInfo($appId);
			if (isset($info['two-factor-providers']) && count($info['two-factor-providers']) > 0) {
				return true;
			}
		}
		return false;
	}
public function isActive ( IUser $ user ) { $ appIds = array_filter ( $ this -> appManager -> getEnabledAppsForUser ( $ user ) , function ( $ appId ) { return $ appId !== $ this -> appName ; } ) ; foreach ( $ appIds as $ appId ) { $ info = $ this -> appManager -> getAppInfo ( $ appId ) ; if ( isset ( $ info [ 'two-factor-providers' ] ) && count ( $ info [ 'two-factor-providers' ] ) > 0 ) { return true ; } } return false ; }
Determine whether backup codes should be active or not
 Backup codes only make sense if at least one 2FA provider is active,
 hence this method checks all enabled apps on whether they provide 2FA
 functionality or not.
Determine whether backup codes should be active or not Backup codes only make sense if at least one 2FA provider is active hence this method checks all enabled apps on whether they provide 2FA functionality or not .