I’m a novice at Nextcloud, but my config.php looks a little different:
'user_backends' =>
array (
0 =>
array (
'class' => 'OC_User_IMAP',
'arguments' =>
array (
0 => '{example.com:993/imap/ssl}',
),
),
),
I don’t know if my setup is “the” correct format, or one of a few possible formats. (It does work, though.)