public function tokenGenerate($number) { $token_table = get_table_name('token'); $array = array('tokenCreatedDate' => DATE, 'number' => $number, 'token' => TOKEN); $this->db->insert($token_table, $array); $this->twilio_sms_library->send_sms($number, 'please enter token:' . TOKEN); //918871923988 return response_success($array, 'SUCCESS', ""); }
/** * Alias of response_success * @param array $data * @return array */ function success($data = array()) { return response_success($data); }
/** *deactivate account by userid *@post */ public function deactivateAccount_post() { $this->form_validation->set_rules('userId', 'User Id', 'required'); if ($this->form_validation->run() == TRUE) { $data = $this->user_model->deactivateAccount(); if ($data) { $this->response(response_success("Account Deactivated", "SUCCESS", "")); } else { $this->response(response_fail('FAILED', "Something went wrong!")); } } else { $this->response(response_fail('FAILED', strip_tags(validation_errors()))); } }