I would suggest asking your friend's insurance company to make sure.
I've just lent my van to my friends, before that I asked my insurance about it, was told that it's the same as driving it myself, so if accident happens then I'll claim and my insurance premium will increase. So it's fine & legal for them to drive it.