Create an function that will send an email with text and some link like: www.site.com/activate.php?random=ng8a8712jh3j Where activate.php is your script which will get the randomly generated code and will match it with this specific email /user,并将状态设置为已激活。