robogals / myrobogals

myRobogals is the global intranet and record-keeping tool for Robogals. It has been built to simplify many of our day-to-day tasks including organising school visits, maintaining a member database, communicating with members, storing records reliably for future generations and easily collecting statistics on a global scale.
https://my.robogals.org
10 stars 21 forks source link

Send SMS from own mobile number #17

Closed U-238 closed 12 years ago

U-238 commented 12 years ago

There are two parts to this:

  1. There should be a page where the user can verify their mobile number. This is done by sending the user an SMS with a unique code, and they enter that unique code into the website. Use the existing attribute user.mobile_verified for this. If the user later changes their mobile number, the verified attribute should be reverted back to false.
  2. When a user sends an SMS, they should have the option (from the existing drop-down menu) of sending from the standard Robogals number or from their own number, if verified.

Already the API allows the SMS "from" number to be anything, and myRobogals already passes the SMSMessage.senderid attribute to the API. So it's just a matter of adding functionality in the frontend. I don't think any models need to be modified to implement this.

yfcheung commented 12 years ago

Where should I put the link for mobile phone verification? (I suggest: Profile -> Mobile Verification)

By changing mobile number, do you mean user re-edit the user profile mobile number?

Do you have some standard function for generating verification code? possible verification generation: str(datetime.hour_60_60 + datetime.minutes*60 + datetime.second) + str(user.pk) + str(random.randint) Temporary Storage from code generation to code verification:

  1. using request.session['codeMobileVeri']
  2. <input type="hidden" name="codeMobileVeri" value="verification code" />

I put option 1 on list, because I still can not find out the potential problem with request.session

U-238 commented 12 years ago
U-238 commented 12 years ago

I just noticed your pull request, where you seem to have done all of this anyway. So well done! I will merge it now.

yfcheung commented 12 years ago

I think the verification generation is not just fine, it is kicking bottom