|
@@ -129,14 +129,14 @@ class User extends Api
|
|
|
|
|
|
$countrycode = input('countrycode',65,'intval');
|
|
|
$mobile = input('mobile');
|
|
|
- $captcha = input('captcha');
|
|
|
+// $captcha = input('captcha');
|
|
|
|
|
|
$email = input('email');
|
|
|
$emailcaptcha = input('emailcaptcha');
|
|
|
|
|
|
$password = input('password');
|
|
|
|
|
|
- if (!$firstname || !$lastname || !$mobile || !$captcha || !$email || !$emailcaptcha || !$password) {
|
|
|
+ if (!$firstname || !$lastname || !$mobile || !$email || !$emailcaptcha || !$password) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
|
|
|
@@ -150,10 +150,10 @@ class User extends Api
|
|
|
|
|
|
|
|
|
$fullmobile = $countrycode.$mobile;
|
|
|
- $ret = Sms::check($fullmobile, $captcha, 'register');
|
|
|
+ /*$ret = Sms::check($fullmobile, $captcha, 'register');
|
|
|
if (!$ret) {
|
|
|
$this->error(__('Mobile Captcha is incorrect'));
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
$ret = Ems::check($email, $emailcaptcha, 'register');
|
|
|
if (!$ret) {
|
|
@@ -166,13 +166,16 @@ class User extends Api
|
|
|
'simplemobile' => $mobile,
|
|
|
'height' => input('height',''),
|
|
|
'age' => input('age',''),
|
|
|
+ 'birthday' => strtotime(input('birthday','')),
|
|
|
'weight' => input('weight',''),
|
|
|
'address' => input('address',''),
|
|
|
'knowus' => input('knowus',''),
|
|
|
|
|
|
'health' => input('health',''),
|
|
|
'emergency' => input('emergency',''),
|
|
|
+ 'emergency_phone' => input('emergency_phone',''),
|
|
|
'is_first' => input('is_first',''),
|
|
|
+ 'residential' => input('residential',''),
|
|
|
];
|
|
|
$ret = $this->auth->register('', $password, $email, $fullmobile, $extend);
|
|
|
if ($ret) {
|
|
@@ -185,7 +188,7 @@ class User extends Api
|
|
|
|
|
|
//注册配置,怎么知道我们
|
|
|
public function register_config(){
|
|
|
- $rs = [
|
|
|
+ $knowus = [
|
|
|
'Facebook',
|
|
|
'Instagram',
|
|
|
'Family and Friends',
|
|
@@ -193,6 +196,18 @@ class User extends Api
|
|
|
'Whatsapp',
|
|
|
'Others',
|
|
|
];
|
|
|
+
|
|
|
+ $residential = [
|
|
|
+ '北部',
|
|
|
+ '东北部',
|
|
|
+ '东部',
|
|
|
+ '南部',
|
|
|
+ '西部',
|
|
|
+ '中部',
|
|
|
+ ];
|
|
|
+
|
|
|
+ $rs['knowus'] = $knowus;
|
|
|
+ $rs['residential'] = $residential;
|
|
|
$this->success(1,$rs);
|
|
|
}
|
|
|
|