Esempio n. 1
0
function getBestSMSKeyForEmail($email)
{
    list($default_location_id, $company_id) = getDefaultLocationAndCompanyFromEmail($email);
    $company = c2r_companies_get($company_id);
    $sms_key = $company->smskey;
    if (!$sms_key) {
        $sms_key = OCP_SMS_FALLBACK;
    }
    return $sms_key;
}
Esempio n. 2
0
        addInfoMessage(t('Phone number deleted'));
        c2r_user_number_delete($del_unid);
    }
    if (isset($_POST['default']) && ($dnid = $_POST['default'])) {
        c2r_user_number_default($user->id, $dnid);
    }
    if (isset($_POST['dlid']) && ($dlid = $_POST['dlid']) && isset($_POST['language']) && ($lng = $_POST['language'])) {
        c2r_user_update_default_location($user->id, $dlid);
        c2r_user_update_language($user->id, $lng);
        $user->ui->language = $lng;
        addInfoMessage(t('Profile Data updated'));
    }
}
$ui = c2r_get_user_info_object($uid);
$uns = c2r_user_number_get($uid);
$companies = c2r_companies_get();
// if not super admin, only show locations for company
$cid_for_loc = 0;
if ($user->group_id < 3) {
    $cid_for_loc = $user->company_id;
}
$locations = c2r_locations_get(0, $cid_for_loc);
$bool_to_activate = false;
foreach ($uns as $key => $un) {
    if ($un->is_active) {
        continue;
    }
    $bool_to_activate = true;
}
// Add Message to change Password
if (isset($_GET['cp'])) {