CSubcription::IsAuthorized( $ID );
The method IsAuthorized checks if the current user is authorized to access the subscription preferences.
Parameter | Description |
---|---|
$ID | The subscription ID. |
Returns true if the visitor is authorized to access the subscription preferences, or false otherwise.
//check if we are already authorized to show password field $bShowPass = true; $aSubscr = CSubscription::GetUserSubscription(); if($aSubscr["ID"] > 0) { //try to authorize user account's subscription if ($aSubscr["USER_ID"]>0 && !CSubscription::IsAuthorized($aSubscr["ID"])) { CSubscription::Authorize($aSubscr["ID"], ""); } //check authorization if (CSubscription::IsAuthorized($aSubscr["ID"])) $bShowPass = false; }
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |