当前位置: 首页>>代码示例>>PHP>>正文


PHP CUser::SendUserInfo方法代码示例

本文整理汇总了PHP中CUser::SendUserInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CUser::SendUserInfo方法的具体用法?PHP CUser::SendUserInfo怎么用?PHP CUser::SendUserInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUser的用法示例。


在下文中一共展示了CUser::SendUserInfo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetMessage

         $errorMessage .= GetMessage("STOF_ERROR_REG_UNIQUE_LOGIN") . "<br>";
     }
     $rsUsers = CUser::GetList($by = "id", $order = "desc", array("EMAIL" => $payerEMail));
     $arUser = $rsUsers->Fetch();
     if (count($arUser) > 1) {
         $errorMessage .= GetMessage("STOF_ERROR_REG_UNIQUE_EMAIL") . "<br>";
     }
     if ('' == $errorMessage) {
         $user_id = CSaleUser::DoAutoRegisterUser($payerEMail, $payerName, SITE_ID, $arErrors, array());
         if ($user_id > 0 && empty($arErrors)) {
             $USER->Authorize($user_id);
             $currentUserId = (int) $USER->GetID();
             //send mail register user
             if ($arParams["SEND_NEW_USER_NOTIFY"] == "Y") {
                 $userNew = str_replace("#FIO#", "(" . $arUser["LOGIN"] . ") " . $payerName, GetMessage("NEWO_BUYER_REG_OK"));
                 CUser::SendUserInfo($user_id, SITE_ID, $userNew, true);
             }
         } else {
             foreach ($arErrors as $val) {
                 $errorMessage .= $val["TEXT"] . "<br>";
             }
         }
     }
 }
 /*
  * calc basket
  */
 $arErrors = array();
 $arWarnings = array();
 $arShoppingCart = CSaleBasket::DoGetUserShoppingCart(SITE_ID, $currentUserId, intval(CSaleBasket::GetBasketUserID()), $arErrors);
 $productLimit = "";
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例2: floatval

						&& floatval($val["QUANTITY"] - $arItems["QUANTITY"]) > floatval($arCatalogProduct["QUANTITY"] + $arCatalogProduct["QUANTITY_RESERVED"])
					)
					{
						$errorMessage .= str_replace("#NAME#", $val['NAME'], GetMessage("NEWO_ERR_PRODUCT_NULL_BALANCE"));
					}
				}
			}
		}
	}

	// saving
	if (strlen($errorMessage) <= 0)
	{
		//send new user mail
		if ($btnNewBuyer == "Y" && strlen($userNew) > 0)
			CUser::SendUserInfo($str_USER_ID, $LID, $userNew, true);

		$arShoppingCart = array();
		$arOrderProductPrice = fGetUserShoppingCart($_POST["PRODUCT"], $LID, $recalcOrder);

		foreach ($arOrderProductPrice as &$arItem)
		{
			$arItem["ID_TMP"] = $arItem["ID"];
			unset($arItem["ID"]);
		}
		unset($arItem);

		$tmpOrderId = ($ID == 0) ? 0 : $ID;

		$arOrderOptions = array(
			'CART_FIX' => (isset($_REQUEST['CART_FIX']) && 'Y' == $_REQUEST['CART_FIX'] ? 'Y' : 'N')
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php

示例3: array

             $password_min_length = 6;
         }
         $password_chars = array("abcdefghijklnmopqrstuvwxyz", "ABCDEFGHIJKLNMOPQRSTUVWXYZ", "0123456789");
         if ($arPolicy["PASSWORD_PUNCTUATION"] === "Y") {
             $password_chars[] = ",.<>/?;:'\"[]{}\\|`~!@#\$%^&*()-_+=";
         }
         $NEW_PASSWORD = $NEW_PASSWORD_CONFIRM = randString($password_min_length + 2, $password_chars);
         $user = new CUser();
         $arAuthResult = $user->Add(array("LOGIN" => $NEW_LOGIN, "NAME" => $NEW_NAME, "LAST_NAME" => $NEW_LAST_NAME, "PASSWORD" => $NEW_PASSWORD, "CONFIRM_PASSWORD" => $NEW_PASSWORD_CONFIRM, "EMAIL" => $NEW_EMAIL, "GROUP_ID" => $GROUP_ID, "ACTIVE" => "Y", "LID" => SITE_ID));
         if (IntVal($arAuthResult) <= 0) {
             $arResult["ERROR"][] = GetMessage("STOF_ERROR_REG") . (strlen($user->LAST_ERROR) > 0 ? ": " . $user->LAST_ERROR : "");
         } else {
             $USER->Authorize($arAuthResult);
             if ($USER->IsAuthorized()) {
                 if ($arParams["SEND_NEW_USER_NOTIFY"] == "Y") {
                     CUser::SendUserInfo($USER->GetID(), SITE_ID, GetMessage("INFO_REQ"), true);
                 }
             } else {
                 $arResult["ERROR"][] = GetMessage("STOF_ERROR_REG_CONFIRM");
             }
         }
     } else {
         $arResult["ERROR"][] = GetMessage("STOF_ERROR_EMAIL");
     }
 }
 if ($arUserResult["PAY_SYSTEM_ID"] <= 0 && $arUserResult["PAY_CURRENT_ACCOUNT"] != "Y") {
     $arResult["ERROR"][] = GetMessage("STOF_ERROR_PAY_SYSTEM");
 }
 if ($USER->IsAuthorized() && empty($arResult["ERROR"])) {
     $arFields = array("LID" => SITE_ID, "PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"], "PAYED" => "N", "CANCELED" => "N", "STATUS_ID" => "N", "PRICE" => $orderTotalSum, "CURRENCY" => $arResult["BASE_LANG_CURRENCY"], "USER_ID" => IntVal($USER->GetID()), "PAY_SYSTEM_ID" => $arUserResult["PAY_SYSTEM_ID"], "PRICE_DELIVERY" => $arResult["DELIVERY_PRICE"], "DELIVERY_ID" => strlen($arUserResult["DELIVERY_ID"]) > 0 ? $arUserResult["DELIVERY_ID"] : false, "DISCOUNT_VALUE" => $arResult["DISCOUNT_PRICE"], "TAX_VALUE" => $arResult["bUsingVat"] == "Y" ? $arResult["VAT_SUM"] : $arResult["TAX_PRICE"], "USER_DESCRIPTION" => $arUserResult["ORDER_DESCRIPTION"]);
     $arOrderDat['USER_ID'] = IntVal($USER->GetID());
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php

示例4: GetMessage

                 $errorMessage .= GetMessage("SPCR1_NO_PASSWORD") . ".<br />";
             }
             $NEW_PASSWORD_CONFIRM = $_REQUEST["NEW_PASSWORD_CONFIRM"];
             if (strlen($NEW_PASSWORD_CONFIRM) <= 0) {
                 $errorMessage .= GetMessage("SPCR1_NO_PASSWORD_CONF") . ".<br />";
             }
             if (strlen($NEW_PASSWORD) > 0 && strlen($NEW_PASSWORD_CONFIRM) > 0 && $NEW_PASSWORD != $NEW_PASSWORD_CONFIRM) {
                 $errorMessage .= GetMessage("SPCR1_NO_CONF") . ".<br />";
             }
             if (strlen($errorMessage) <= 0) {
                 $arAuthResult = $GLOBALS["USER"]->Register($NEW_LOGIN, $NEW_NAME, $NEW_LAST_NAME, $NEW_PASSWORD, $NEW_PASSWORD_CONFIRM, $NEW_EMAIL, LANG, $_REQUEST["captcha_word"], $_REQUEST["captcha_sid"]);
                 if ($arAuthResult != False && $arAuthResult["TYPE"] == "ERROR") {
                     $errorMessage .= GetMessage("SPCR1_ERR_REGISTER") . (strlen($arAuthResult["MESSAGE"]) > 0 ? ": " . $arAuthResult["MESSAGE"] : ".<br />");
                 } else {
                     if ($GLOBALS["USER"]->IsAuthorized()) {
                         CUser::SendUserInfo($GLOBALS["USER"]->GetID(), SITE_ID, GetMessage("INFO_REQ"), true);
                     }
                 }
             }
             $arResult["NEW_LOGIN"] = htmlspecialcharsbx($NEW_LOGIN);
             $arResult["NEW_NAME"] = htmlspecialcharsbx($NEW_NAME);
             $arResult["NEW_LAST_NAME"] = htmlspecialcharsbx($NEW_LAST_NAME);
             $arResult["NEW_PASSWORD"] = htmlspecialcharsbx($NEW_PASSWORD);
             $arResult["NEW_PASSWORD_CONFIRM"] = htmlspecialcharsbx($NEW_PASSWORD_CONFIRM);
             $arResult["NEW_EMAIL"] = htmlspecialcharsbx($NEW_EMAIL);
         }
     }
 }
 $arResult["AFFILIATE"] = "N";
 $arResult["UNACTIVE_AFFILIATE"] = "N";
 if ($GLOBALS["USER"]->IsAuthorized()) {
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例5: createUser

 public static function createUser($providerName, $userProfile)
 {
     global $USER;
     COption::SetOptionString("main", "captcha_registration", "N");
     $default_group = COption::GetOptionString("main", "new_user_registration_def_group");
     if (!empty($default_group)) {
         $arrGroups = explode(",", $default_group);
     }
     $password = mb_substr(md5(uniqid(rand(), true)), 0, 8);
     $birthday = $userProfile["birthDay"] . "." . $userProfile["birthMonth"] . "." . $userProfile["birthYear"];
     if (strlen($birthday) != 10) {
         $birthday = "";
     }
     $email = "";
     if (!empty($userProfile["email"])) {
         $email = $userProfile["email"];
     } else {
         if (!empty($userProfile["emailVerified"])) {
             $email = $userProfile["emailVerified"];
         }
     }
     if (empty($userProfile["firstName"]) && empty($userProfile["lastName"])) {
         $userProfile["firstName"] = $userProfile["displayName"];
     }
     $cUser = new \CUser();
     $arFields = array("NAME" => $userProfile["firstName"], "LAST_NAME" => $userProfile["lastName"], "EMAIL" => $email, "LOGIN" => $email, "PERSONAL_GENDER" => strtoupper(substr($userProfile["gender"], 0, 1)), "PERSONAL_WWW" => $arResult['USER']["URL"], "PERSONAL_BIRTHDAY" => $birthday, "ACTIVE" => "Y", "GROUP_ID" => $arrGroups, "EXTERNAL_AUTH_ID" => $providerName . $userProfile["identifier"], "PASSWORD" => $password, "CONFIRM_PASSWORD" => $password, "PERSONAL_PHONE" => $userProfile["phone"], "PERSONAL_CITY" => $userProfile["home_town"]);
     //$json = file_get_contents('https://graph.facebook.com/'.$userProfile["identifier"].'/picture?type=large');
     //$file = $_SERVER["DOCUMENT_ROOT"].'/upload/avatar/'.$userProfile["identifier"].'.jpg';
     if (!empty($userProfile["photoURL"])) {
         if ($providerName == "facebook") {
             $img = file_get_contents('https://graph.facebook.com/' . $userProfile["identifier"] . '/picture?type=large');
             $file = $_SERVER["DOCUMENT_ROOT"] . '/upload/avatar/' . $userProfile["identifier"] . '.jpg';
             file_put_contents($file, $img);
         } else {
             if ($providerName == "yandex") {
                 $img = file_get_contents('https://avatars.yandex.net/get-yapic/' . $userProfile["identifier"] . '/islands-200');
                 $file = $_SERVER["DOCUMENT_ROOT"] . '/upload/avatar/' . $userProfile["identifier"] . '.jpg';
                 file_put_contents($file, $img);
             } else {
                 if ($providerName == "linkedin") {
                     $img = file_get_contents($userProfile["photoURL"]);
                     $file = $_SERVER["DOCUMENT_ROOT"] . '/upload/avatar/' . $userProfile["identifier"] . '.jpg';
                     file_put_contents($file, $img);
                 } else {
                     $file = $userProfile["photoURL"];
                 }
             }
         }
         $arImage = \CFile::MakeFileArray($file);
         $arImage["MODULE_ID"] = "main";
         $arFields["PERSONAL_PHOTO"] = $arImage;
     }
     $USER_ID = $cUser->Add($arFields);
     if ($USER_ID) {
         \CUser::SendUserInfo($USER_ID, SITE_ID, "Приветствуем Вас как нового пользователя нашего сайта!");
         if (!empty($email)) {
             \CUserEx::capacityAdd($USER_ID, 1);
             // за мэйл +1ГБ
             $fields = array();
             $fields["EXTERNAL_AUTH_ID"] = "";
             $fields["PASSWORD"] = $password;
             $fields["CONFIRM_PASSWORD"] = $password;
             $сuser = new \CUser();
             $сuser->Update($USER_ID, $fields);
             $arEventFields = array("USER_NAME" => trim($userProfile["firstName"] . " " . $userProfile["lastName"]), "PASSWORD" => $password, "EMAIL" => $email);
             CEvent::Send("USER_PASS_CHANGED_PROFILE", SITE_ID, $arEventFields);
             $USER->Login($email, $password, 'N');
         }
         //Бонус за регистрацию
         \CUserEx::capacityAdd($USER_ID, BONUS_FOR_REGISTRATION);
         self::connectToUser($USER_ID, $providerName, $userProfile);
     } else {
         echo $cUser->LAST_ERROR;
     }
     COption::SetOptionString("main", "captcha_registration", "Y");
     return $USER_ID;
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:77,代码来源:CSocialAuth.php

示例6: CUser

 if ($USER_TYPE == "U") {
     $user = new CUser();
 }
 $nError = 0;
 $nSuccess = 0;
 foreach ($aEmail as $email => $temp) {
     $USER_ID = false;
     if ($USER_TYPE == "U") {
         //add user
         $sPassw = randString(6);
         $arUserFields = array("LOGIN" => randString(50), "CHECKWORD" => randString(8), "PASSWORD" => $sPassw, "CONFIRM_PASSWORD" => $sPassw, "EMAIL" => $email, "ACTIVE" => "Y", "GROUP_ID" => $USER->IsAdmin() ? $USER_GROUP_ID : array(COption::GetOptionString("main", "new_user_registration_def_group")));
         if ($USER_ID = $user->Add($arUserFields)) {
             $user->Update($USER_ID, array("LOGIN" => "user" . $USER_ID));
             //send registration message
             if ($SEND_REG_INFO == "Y") {
                 $user->SendUserInfo($USER_ID, $LID, GetMessage("subscr_send_info"));
             }
         } else {
             $arError[] = array("id" => "", "text" => $email . ": " . $user->LAST_ERROR);
             $nError++;
             continue;
         }
     }
     //$USER_TYPE == "U"
     //add subscription
     $arFields["USER_ID"] = $USER_ID;
     $arFields["EMAIL"] = $email;
     if (!$subscr->Add($arFields, $LID)) {
         $arError[] = array("id" => "", "text" => $email . ": " . $subscr->LAST_ERROR);
         $nError++;
     } else {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:subscr_import.php

示例7: array

        }
    }
    if (CModule::IncludeModule("learning") && $strError == '') {
        $arStudentFields = array("RESUME" => $_REQUEST["student_RESUME"], "PUBLIC_PROFILE" => $_REQUEST["student_PUBLIC_PROFILE"] == "Y" ? "Y" : "N");
        $ar_res = CStudent::GetList(array(), array("USER_ID" => $arResult["ID"]));
        if ($arStudent = $ar_res->Fetch()) {
            $learning_res = CStudent::Update($arResult["ID"], $arStudentFields);
        } else {
            $arStudentFields["USER_ID"] = $arResult["ID"];
            $STUDENT_USER_ID = CStudent::Add($arStudentFields);
            $learning_res = intval($STUDENT_USER_ID) > 0;
        }
    }
    if ($strError == '') {
        if ($arParams['SEND_INFO'] == 'Y') {
            $obUser->SendUserInfo($arResult["ID"], SITE_ID, GetMessage("ACCOUNT_UPDATE"), true);
        }
        $bOk = true;
    }
}
$rsUser = CUser::GetByID($arResult["ID"]);
if (!($arResult["arUser"] = $rsUser->GetNext(false))) {
    $arResult["ID"] = 0;
}
if (CModule::IncludeModule("blog")) {
    $arResult["INCLUDE_BLOG"] = "Y";
    $arResult["arBlogUser"] = array();
    $arBlg = CBlogUser::GetByID($arResult["ID"], BLOG_BY_USER_ID);
    if (is_array($arBlg)) {
        foreach ($arBlg as $key => $val) {
            $arResult["arBlogUser"]["~" . $key] = $val;
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例8: switch

 //confirmation code request
 switch ($_REQUEST["action"]) {
     case "sendcode":
         if (CSubscription::ConfirmEvent($ID)) {
             $iMsg = "SENT";
         }
         break;
     case "sendpassword":
         if (intval($arSubscription["USER_ID"]) == 0) {
             //anonymous subscription
             if (CSubscription::ConfirmEvent($ID)) {
                 $iMsg = "SENT";
             }
         } else {
             //user account subscription
             CUser::SendUserInfo($arSubscription["USER_ID"], LANG, GetMessage("subscr_send_pass_mess"), true);
             $iMsg = "SENTPASS";
             LocalRedirect($APPLICATION->GetCurPage() . "?sf_EMAIL=" . urlencode($_REQUEST["sf_EMAIL"]) . "&change_password=yes&mess_code=" . urlencode($iMsg));
         }
         break;
     case "unsubscribe":
         if (CSubscription::IsAuthorized($ID)) {
             //unsubscription
             if ($obSubscription->Update($ID, array("ACTIVE" => "N"))) {
                 $arSubscription["ACTIVE"] = "N";
                 $iMsg = "UNSUBSCR";
             }
         }
         break;
     case "activate":
         if (CSubscription::IsAuthorized($ID)) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例9: IncludeModuleLangFile

                     }
                 }
             }
         }
     }
     if ($strError == '' && $res) {
         if ($_POST["user_info_event"] == "Y") {
             $arMess = false;
             $res_site = CSite::GetByID($_POST["LID"]);
             if ($res_site_arr = $res_site->Fetch()) {
                 $arMess = IncludeModuleLangFile(__FILE__, $res_site_arr["LANGUAGE_ID"], true);
             }
             if ($new == "Y") {
                 CUser::SendUserInfo($ID, $_POST["LID"], $arMess !== false ? $arMess["ACCOUNT_INSERT"] : GetMessage("ACCOUNT_INSERT"), true);
             } else {
                 CUser::SendUserInfo($ID, $_POST["LID"], $arMess !== false ? $arMess["ACCOUNT_UPDATE"] : GetMessage("ACCOUNT_UPDATE"), true);
             }
         }
         if ($USER->CanDoOperation('edit_all_users') || $USER->CanDoOperation('edit_subordinate_users') || $USER->CanDoOperation('edit_own_profile') && $ID == $uid) {
             if ($_POST["save"] != '') {
                 LocalRedirect($strRedirect_admin);
             } elseif ($_POST["apply"] != '') {
                 LocalRedirect($strRedirect . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
             } elseif (strlen($save_and_add) > 0) {
                 LocalRedirect($strRedirect . "&ID=0&" . $tabControl->ActiveTabParam());
             }
         } elseif ($new == "Y") {
             LocalRedirect($strRedirect . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
         }
     }
 }
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:user_edit.php

示例10: ini_set

<?php

ini_set("max_execution_time", 3600);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
global $USER;
if (!$USER->isAuthorized() && !in_array(1, $USER->GetUserGroupArray())) {
    LocalRedirect("/bitrix/");
    exit;
} else {
    if (!CModule::IncludeModule("iblock")) {
        return false;
    }
    $arFilter = array("ID" => "", "ACTIVE" => "N", "LOGIN" => "", "NAME" => "", "EMAIL" => "", "!GROUPS_ID" => array(1));
    $rsUsers = CUser::GetList($by = "", $order = "", $arFilter);
    while ($arUser = $rsUsers->Fetch()) {
        $arUsers[] = $arUser;
    }
    if ($arUsers) {
        $user = new CUser();
        $fields = array("ACTIVE" => "Y");
        if ($user->Update($arUser["ID"], $fields)) {
            if (CUser::SendUserInfo($arUser["ID"], SITE_ID, "")) {
                echo "Сообщение отправлено на email:" . $arUser["EMAIL"] . "<br/>";
            } else {
                echo $user->LAST_ERROR . "<br/>";
            }
        }
    } else {
        echo "false";
    }
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:eventUsers.php


注:本文中的CUser::SendUserInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。