I am just a newbie so combining would be a hard thing because I need to know where is the errors, but I can't make it better that what you did
I don't want to use
PHP Code:
print_no_permission()
I thought about using it but the message is better to show the reason
I am not sure about
PHP Code:
$user['userid']
it dosen't work even with
PHP Code:
$userinfo['userid']
but it is used in the template MEMBERINFO
I don't think there should be template change because the plugin hook is member_start