My problem has been solved,Thank you!
If the user is logged in, How to create a custom script for it.