summaryrefslogtreecommitdiffstats
path: root/admin/survey/modules/mod_MAZA/class.MAZA.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /admin/survey/modules/mod_MAZA/class.MAZA.php
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to 'admin/survey/modules/mod_MAZA/class.MAZA.php')
-rw-r--r--admin/survey/modules/mod_MAZA/class.MAZA.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/admin/survey/modules/mod_MAZA/class.MAZA.php b/admin/survey/modules/mod_MAZA/class.MAZA.php
index c430546..5c67424 100644
--- a/admin/survey/modules/mod_MAZA/class.MAZA.php
+++ b/admin/survey/modules/mod_MAZA/class.MAZA.php
@@ -1115,12 +1115,11 @@ class MAZA {
* @return type - json result of curl output
*/
private function send_FCM_mesage_curl($fields){
- #API access key from Google API's Console
- global $FCM_server_key;
+ #API access key from Google API's Console
$headers = array
(
- 'Authorization: key=' . $FCM_server_key,
+ 'Authorization: key=' . AppSettings::getInstance()->getSetting('maza-FCM_server_key'),
'Content-Type: application/json'
);
#Send Reponse To FireBase Server
@@ -1339,7 +1338,7 @@ class MAZA {
* @param type $tactivity_id - id of triggered activity
* @param type $mode - mode of survey (repeater, geofence, activity, entry)
*/
- public function maza_save_srv_user($maza_uid, $srv_uid, $srv_version, $tgeofence_id=null, $tactivity_id=null, $mode) {
+ public function maza_save_srv_user($maza_uid, $srv_uid, $srv_version, $tgeofence_id=null, $tactivity_id=null, $mode=null) {
//check if pair already existst in DB
$sql = sisplet_query("SELECT * FROM maza_srv_users WHERE maza_user_id='$maza_uid' AND srv_user_id='$srv_uid'");
//it is already there
@@ -1790,16 +1789,14 @@ class MAZA {
* @param type $password - passwor to set in nextpin for this user
*/
public function nextpin_create_user($identifier, $password){
- #credentials to use nextpin API
- global $NextPinMainToken;
-
+ #credentials to use nextpin API
$fields = array
(
'username' => $this->nextpin_token_prefix . $identifier,
'password' => $password
);
- $this -> nextpin_API_call($NextPinMainToken, $fields, 'auth/createUser');
+ $this -> nextpin_API_call(AppSettings::getInstance()->getSetting('maza-NextPinMainToken'), $fields, 'auth/createUser');
}
/**