Here's what you can do:
- Store your own email address in a global variable, for example:
code:
var sAllowedEmail = "myself@hotmail.com";
- In the OnEvent_Signin event, check the received first parameter (Email) against the allowed email address.
- If the email addresses match, do nothing.
- If the email addresses do not match, use Messenger.Signout() to make this unwanted user sign out. Display a friendly(?) toast message with MsgPlus.DisplayToast to inform them why he/she has just been signed out.
Although this will work great, it won't actually prevent them to sign in: they'll simply be signed out as soon as they are signed in, which is just as effective (and annoying) in my opinion.
Please, try not to ask us for copy-paste-ready code, this script request is very easy to achieve when you simply have a look at the scripting documentation. The best way to learn programming is by trying new things out yourself!