markdown import-users-with-same-email.md

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown import-users-with-same-email.md相关的知识,希望对你有一定的参考价值。

WordPress doesn't allow multiple users to share the same e-mail address, but there are certain plugins that change that behavior. This is an example workaround using the Allow Multiple Accounts plugin.

1) Install and activate this plugin: https://wordpress.org/plugins/allow-multiple-accounts/

2) Use a custom PHP function in the import to generate a fake e-mail for the imported user(s): [fake_email()]. Screenshot: https://d.pr/FREE/Yr0MOL.

3) Store the real e-mail in a Custom Field named '_email_temp'. Screenshot: https://d.pr/ERw4F9

4) Use [our API](https://github.com/soflyy/wp-all-import-action-reference) to change the users e-mail to the real e-mail after the user is saved.

Here’s all of the code you’ll need to add inside the Function Editor via All Import -> Settings: https://d.pr/ef9JAn.

That’s it. Keep in mind that this code runs for all imports, so you might consider wrapping it in an [if conditional](http://php.net/manual/en/control-structures.if.php) based on the import ID ( which you can get from $_GET['id'] for manual runs or $_GET['import_id'] for cron job imports ).

以上是关于markdown import-users-with-same-email.md的主要内容,如果未能解决你的问题,请参考以下文章

转换rst到markdown总结

markdown [Markdown HowTo]作为Markdown语法的秘籍

python markdown干啥用的

markdown前端渲染

如何用markdown生成目录

markdown排版示例