简体   繁体   English

更改joomla1.5的激活行为

[英]Changing the activation behavior of joomla1.5

I am wondering if i can change the activation behavior after registration in joomla 1.5. 我想知道在joomla 1.5中注册后是否可以更改激活行为。 The requirement is such that when a user registers and depending on the group the user belongs the activation code is either sent through email or as sms to the subscriber phone. 要求是这样的:当用户注册时,取决于用户所属的组,激活码要么通过电子邮件发送,要么以短信形式发送到用户电话。

If the user is sent an sms the user enters the generated activation code before the account is active. 如果向用户发送了短信,则该用户将在激活帐户之前输入生成的激活码。

I need to know how to go about this and what best practice should i adhere to. 我需要知道该如何做以及应该遵循的最佳实践。

I am using rsMembership component for subscription. 我正在使用rsMembership组件进行订阅。

Thank you all 谢谢你们

I am assuming you have access to an API that will provide the SMS service, but you will basically need to rewrite certain sections of the 'register' task method in the com_users controller. 我假设您可以访问将提供SMS服务的API,但是基本上您将需要在com_users控制器中重写“ register”任务方法的某些部分。 I cannot give you specifics as you have not provided enough details, ie how will you determine the group etc? 由于您没有提供足够的详细信息,因此我无法提供具体信息,即您将如何确定小组等?

The basic run down would be: 基本的消耗是:

Registration > Catch it before it sends the email > run an assertion > connect to the API, send the SMS 注册>在发送电子邮件之前将其捕获>运行断言>连接到API,发送SMS

You would then need to create either another page in the com_users component, or separate to it, that will take the activation code, compare it with the value in the database (you should take the email address too and select the row using that as the key), if the code if correct, set the rows 'blocked' value to 0, or whatever needs to change in order to be seen as an active user, you can then finish up with an activation email if you wish. 然后,您将需要在com_users组件中创建另一个页面,或者单独创建该页面,该页面将使用激活码,将其与数据库中的值进行比较(您也应该使用电子邮件地址,并使用该地址选择行键),如果代码正确,请将“已阻止”行的值设置为0,或者需要进行任何更改才能被视为活跃用户,然后您可以根据需要填写激活电子邮件。

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

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