|
@@ -17,6 +17,8 @@ require_once(BASE_ROOT_PATH . '/helper/room/tpl_chatwo_home.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/FileUploader.php');
|
|
|
|
|
|
use room\proto_type;
|
|
|
+use sms_helper;
|
|
|
+use Sms;
|
|
|
|
|
|
class member_talkControl extends mbMemberControl
|
|
|
{
|
|
@@ -1122,12 +1124,19 @@ class member_talkControl extends mbMemberControl
|
|
|
{
|
|
|
$cmobile = intval($_GET['cmobile']);
|
|
|
$code = trim($_GET['code']);
|
|
|
- $cmail = trim($_GET['cmail']);
|
|
|
|
|
|
$validator = new Validator();
|
|
|
$validator->setValidate(Validator::verify_mobile($cmobile));
|
|
|
$validator->setValidate(Validator::verify_smscode($code));
|
|
|
$err = $validator->validate();
|
|
|
+ if ($err != '') {
|
|
|
+ return self::outerr(errcode::ErrInputParam, $err);
|
|
|
+ }
|
|
|
+
|
|
|
+ $ret = sms_helper::check_code(Sms::register_code,$code,$cmobile);
|
|
|
+ if(is_array($ret)) {
|
|
|
+ return self::outerr($ret['code'], $ret['msg']);
|
|
|
+ }
|
|
|
|
|
|
$ctype = intval($_GET['ctype']);
|
|
|
$room_id = intval($_GET['room_id']);
|
|
@@ -1136,7 +1145,7 @@ class member_talkControl extends mbMemberControl
|
|
|
$full_name = trim($_GET['full_name']);
|
|
|
|
|
|
$cname = trim($_GET['cname']);
|
|
|
-
|
|
|
+ $cmail = trim($_GET['cmail']);
|
|
|
if(preg_match('/^([.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\\.[a-zA-Z0-9_-])+/',$cmail)) {
|
|
|
|
|
|
}
|