简体   繁体   English

Drupal试用帐户开发

[英]Drupal trial account development

I am creating a website where you can create an account with your name and email. 我正在创建一个网站,您可以在其中创建带有您的姓名和电子邮件的帐户。 When this is done, you get a 30 day trial. 完成后,您将获得30天的试用期。 From this point, you can 'upgrade' your account by supplying more information. 从这一点出发,您可以通过提供更多信息来“升级”您的帐户。

When you do not update your information after 30 days, your account is suspended. 如果30天后您不更新信息,则您的帐户将被暂停。

Can anyone give me some tips how to do this ? 谁能给我一些如何做的提示? So: - Create profile with email and name (easy), indicator is stored in db that you are trial user. 因此:-用电子邮件和名称(简单)创建配置文件,指示符存储在您是试用用户的数据库中。 - When you log in, you can extend your profile with extra information. -登录后,您可以使用其他信息扩展个人资料。 indicator that you are full user. 指示您是完全用户。

You can always write your own module to do it, but my recommendation is using the Rules module, and using several user roles. 您总是可以编写自己的模块来执行此操作,但是我的建议是使用“ 规则”模块,并使用多个用户角色。

  • Any new user gets a "trial" role he registers. 任何新用户都会获得他注册的“试用”角色。
  • Create the needed fields in the user profile 在用户个人资料中创建所需的字段
  • Create a rule which will change the user's role in case the field is filled (rule triggeres whenever user profile is updated). 创建一个规则,该规则将在填充字段的情况下更改用户的角色(每当用户配置文件更新时,规则就会触发)。
  • Create a rule with cron that executes once a day, to suspend user account, and probably to send him a notification before doing so. 使用cron创建一条每天执行一次的规则,以暂停用户帐户,并可能在执行此操作之前向他发送通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM