403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/business/pms/modules/cck/modules/userreference/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/business/pms/modules/cck/modules/userreference/userreference.rules.inc
<?php
// $Id: userreference.rules.inc,v 1.1.2.2 2008/10/06 15:02:03 karens Exp $

/**
 * @file
 * Provides additional rules support for userreference fields.
 */

/**
 * Implementation of hook_rules_action_info()
 */
function userreference_rules_action_info() {
  $info = array();
  $info['userreference_rules_action_load'] = array(
    'label' => t('Load a referenced user'),
    'arguments' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content containing the user reference field'),
      ),
    ),
    'new variables' => array(
      'referenced_user' => array(
        'type' => 'user',
        'label' => t('Referenced user'),
      ),
    ),
    'module' => 'CCK',
    'help' => t('Note that if the field has multiple values, only the first user will be loaded.'),
  );
  return $info;
}

function userreference_rules_action_load($node, $settings) {
  $uid = $node->{$settings['field']}[0]['uid'];
  if (isset($uid)) {
    $user = user_load(array('uid' => $uid));
    return array('referenced_user' => $user);
  }
}

function userreference_rules_action_load_form($settings, &$form) {
  $settings += array('field' => '');
  $options = content_rules_get_field_names_by_type('userreference');
  $form['settings']['field'] = array(
    '#type' => 'select',
    '#title' => t('Field'),
    '#default_value' => $settings['field'],
    '#options' => $options,
    '#required' => TRUE,
    '#disabled' => empty($options),
    '#description' => empty($options) ? t('There are no userreference fields defined.') : '',
  );
}

/**
 * Helps upgrading from the workflow-ng action.
 * "workflow_ng_action_load_referenced_user" to the equivalent rules action.
 */
function workflow_ng_action_load_referenced_user_upgrade(&$element) {
  $element['#name'] = 'userreference_rules_action_load';
}

Youez - 2016 - github.com/yon3zu
LinuXploit