Hi Anh,
No, it doesn't make any difference. I have changed it as follows:
function mb_allow_author_uploads() {
if ( is_admin() ) {
return;
}
// Replace 'subscriber' with the required role to update, can also be contributor.
$author = get_role( 'author' );
$author->add_cap( 'upload_files' );
}
add_action( 'init', 'mb_allow_author_uploads' );
But same error message.
My users have the author role, so should be capable of uploading their own images anyway, right?