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


PHP user_get_name函数代码示例

本文整理汇总了PHP中user_get_name函数的典型用法代码示例。如果您正苦于以下问题:PHP user_get_name函数的具体用法?PHP user_get_name怎么用?PHP user_get_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: twitter_issue_resolved

/**
 * Posts a twitter update when a bug is resolved.
 *
 * @param $p_bug_id The bug id that was resolved.
 * @access public
 */
function twitter_issue_resolved($p_bug_id)
{
    if (!twitter_enabled()) {
        return true;
    }
    $t_bug = bug_get($p_bug_id, false);
    # Do not twitter except fixed issues
    if ($t_bug->resolution < config_get('bug_resolution_fixed_threshold') || $t_bug->resolution >= config_get('bug_resolution_not_fixed_threshold')) {
        return true;
    }
    # Do not twitter private bugs.
    if ($t_bug->view_state != VS_PUBLIC) {
        return true;
    }
    # Do not twitter bugs belonging to private projects.
    if (VS_PRIVATE == project_get_field($t_bug->project_id, 'view_state')) {
        return true;
    }
    $c_bug_id = db_prepare_int($p_bug_id);
    if (is_blank($t_bug->fixed_in_version)) {
        $t_message = sprintf(lang_get('twitter_resolved_no_version'), $c_bug_id, category_full_name($t_bug->category_id, false), $t_bug->summary, user_get_name($t_bug->handler_id));
    } else {
        $t_message = sprintf(lang_get('twitter_resolved'), $c_bug_id, category_full_name($t_bug->category_id, false), $t_bug->summary, user_get_name($t_bug->handler_id), $t_bug->fixed_in_version);
    }
    return twitter_update($t_message);
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:32,代码来源:twitter_api.php

示例2: renderIssues

    function renderIssues($status)
    {
        $content = array();
        $t_project_id = helper_get_current_project();
        $t_bug_table = db_get_table('mantis_bug_table');
        $t_user_id = auth_get_current_user_id();
        $specific_where = helper_project_specific_where($t_project_id, $t_user_id);
        if ($this->severity) {
            $severityCond = '= ' . $this->severity;
        } else {
            $severityCond = '> -1';
        }
        $query = "SELECT *\n\t\t\tFROM {$t_bug_table}\n\t\t\tWHERE {$specific_where}\n\t\t\tAND status = {$status}\n\t\t\tAND severity {$severityCond}\n\t\t\tORDER BY last_updated DESC\n\t\t\tLIMIT 20";
        $result = db_query_bound($query);
        $category_count = db_num_rows($result);
        for ($i = 0; $i < $category_count; $i++) {
            $row = db_fetch_array($result);
            //pre_var_dump($row);
            $content[] = '<div class="portlet ui-helper-clearfix" id="' . $row['id'] . '">
			<div class="portlet-header">' . string_get_bug_view_link($row['id']) . ': ' . $row['summary'] . '</div>
			<div class="portlet-content">' . ($row['reporter_id'] ? 'Reporter: ' . user_get_name($row['reporter_id']) . BR : '') . ($row['handler_id'] ? 'Assigned: ' . user_get_name($row['handler_id']) . BR : '') . '</div></div>';
        }
        if ($row) {
            //pre_var_dump(array_keys($row));
        }
        return $content;
    }
开发者ID:vboctor,项目名称:LikeTrello,代码行数:27,代码来源:trello.php

示例3: html

 /**
  * Returns html string to display
  * @return string
  */
 public function html()
 {
     $t_html = $this->html_start();
     $t_html .= '<div class="action">' . sprintf(lang_get('timeline_issue_created'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id)) . '</div>';
     $t_html .= $this->html_end();
     return $t_html;
 }
开发者ID:gtn,项目名称:mantisbt,代码行数:11,代码来源:IssueCreatedTimelineEvent.class.php

示例4: prepare_user_name

/**
 * prepares the name of the user given the id.  also makes it an email link.
 * @param int $p_user_id
 * @return string
 */
function prepare_user_name($p_user_id)
{
    # Catch a user_id of NO_USER (like when a handler hasn't been assigned)
    if (NO_USER == $p_user_id) {
        return '';
    }
    $t_username = user_get_name($p_user_id);
    if (user_exists($p_user_id) && user_get_field($p_user_id, 'enabled')) {
        $t_username = string_display_line($t_username);
        // WK/BFE: Original-Zeile auskommentiert: , LB/BFE 2015
        //		return '<a href="' . string_sanitize_url( 'view_user_page.php?id=' . $p_user_id, true ) . '">' . $t_username . '</a>';
        // ersetzt durch: (Link auf view_user_page nur wenn globale Rolle mindestens $g_manage_user_threshold
        if (user_is_administrator(auth_get_current_user_id())) {
            return '<a href="' . string_sanitize_url('view_user_page.php?id=' . $p_user_id, true) . '">' . $t_username . '</a>';
        } else {
            return $t_username;
        }
        // WK/BFE: Ende der Modifikation
    } else {
        $t_result = '<font STYLE="text-decoration: line-through">';
        $t_result .= string_display_line($t_username);
        $t_result .= '</font>';
        return $t_result;
    }
}
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:30,代码来源:prepare_api.php

示例5: html

 /**
  * Returns html string to display
  * @return string
  */
 public function html()
 {
     $t_string = $this->tag ? lang_get('timeline_issue_tagged') : lang_get('timeline_issue_untagged');
     $t_tag_row = tag_get_by_name($this->tag_name);
     $t_html = $this->html_start();
     $t_html .= '<div class="action">' . sprintf($t_string, user_get_name($this->user_id), string_get_bug_view_link($this->issue_id), $t_tag_row ? tag_get_link($t_tag_row) : $this->tag_name) . '</div>';
     $t_html .= $this->html_end();
     return $t_html;
 }
开发者ID:gtn,项目名称:mantisbt,代码行数:13,代码来源:IssueTagTimelineEvent.class.php

示例6: view_bug_attachment

    function view_bug_attachment($p_event, $p_attachment)
    {
        //log_event( LOG_EMAIL_RECIPIENT, "event=$p_event params=".var_export($p_attachment, true) );
        require_once MANTIS_CORE . '/database_api.php';
        require_once MANTIS_CORE . '/user_api.php';
        $t_query = 'SELECT user_id
		                FROM {bug_file}
		                WHERE id=' . db_param();
        $t_db_result = db_query($t_query, array($p_attachment['id']), 1);
        $t_name = user_get_name(db_result($t_db_result));
        return ' <span class="underline">@' . $t_name . '</span>';
    }
开发者ID:tgulacsi,项目名称:mantisbt-plugins-ShowAttacher,代码行数:12,代码来源:ShowAttacher.php

示例7: html

 /**
  * Returns html string to display
  * @return string
  */
 public function html()
 {
     if ($this->user_id == $this->handler_id) {
         $t_string = sprintf(lang_get('timeline_issue_assigned_to_self'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id));
     } else {
         $t_string = sprintf(lang_get('timeline_issue_assigned'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id), user_get_name($this->handler_id));
     }
     $t_html = $this->html_start();
     $t_html .= '<div class="action">' . $t_string . '</div>';
     $t_html .= $this->html_end();
     return $t_html;
 }
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:16,代码来源:IssueAssignedTimelineEvent.class.php

示例8: prepare_user_name

/**
 * prepares the name of the user given the id.  also makes it an email link.
 * @param int $p_user_id
 * @return string
 */
function prepare_user_name( $p_user_id ) {
	# Catch a user_id of NO_USER (like when a handler hasn't been assigned)
	if( NO_USER == $p_user_id ) {
		return '';
	}

	$t_username = user_get_name( $p_user_id );
	$t_username = string_display_line( $t_username );
	if( user_exists( $p_user_id ) && user_get_field( $p_user_id, 'enabled' ) ) {
		return '<a class="user" href="' . string_sanitize_url( 'view_user_page.php?id=' . $p_user_id, true ) . '">' . $t_username . '</a>';
	} else {
		return '<del class="user">' . $t_username . '</del>';
	}
}
开发者ID:rombert,项目名称:mantisbt,代码行数:19,代码来源:prepare_api.php

示例9: prepare_user_name

/**
 * prepares the name of the user given the id.  also makes it an email link.
 * @param int $p_user_id
 * @return string
 */
function prepare_user_name($p_user_id)
{
    # Catch a user_id of NO_USER (like when a handler hasn't been assigned)
    if (NO_USER == $p_user_id) {
        return '';
    }
    $t_username = user_get_name($p_user_id);
    if (user_exists($p_user_id) && user_get_field($p_user_id, 'enabled')) {
        $t_username = string_display_line($t_username);
        return '<a href="' . string_sanitize_url('view_user_page.php?id=' . $p_user_id, true) . '">' . $t_username . '</a>';
    } else {
        $t_result = '<font STYLE="text-decoration: line-through">';
        $t_result .= string_display_line($t_username);
        $t_result .= '</font>';
        return $t_result;
    }
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:22,代码来源:prepare_api.php

示例10: buildNotificationEmails

 /**
  * Builds notification emails for the selected customers about changes made in bugs reports they are linked to
  *
  * @param array $customer_ids the ids of the customer to notify
  * @param string $from the start of the interval
  * @param string $to the end of the interval
  *
  * @return array notified customers
  */
 static function buildNotificationEmails($customer_ids, $from, $to)
 {
     $emails = array();
     lang_push(plugin_config_get('email_notification_language'));
     $fromDate = self::startOfDay(strtotime($from));
     $toDate = self::endOfDay(strtotime($to));
     $changedBugIds = CustomerManagementDao::findAllChangedBugIds($customer_ids, $fromDate, $toDate);
     $dateFormat = config_get('short_date_format');
     foreach ($customer_ids as $customer_id) {
         $changesForCustomer = array();
         foreach ($changedBugIds as $changedBugId) {
             if ($changedBugId['customer_id'] == $customer_id) {
                 $changesForCustomer[] = array('bug' => bug_get($changedBugId['bug_id']));
             }
         }
         if (count($changesForCustomer) > 0) {
             $counter = 0;
             $text = '';
             foreach ($changesForCustomer as $changeForCustomer) {
                 $counter++;
                 $bugId = $changeForCustomer['bug']->id;
                 $text .= $counter . '. ';
                 $text .= sprintf(plugin_lang_get('email_notification_bug_header'), $changeForCustomer['bug']->id, $changeForCustomer['bug']->summary, date($dateFormat, $changeForCustomer['bug']->date_submitted), get_enum_element('status', $changeForCustomer['bug']->status));
                 $text .= "\n";
                 $reporterName = user_get_name($changeForCustomer['bug']->reporter_id);
                 $reporterEmail = user_get_email($changeForCustomer['bug']->reporter_id);
                 $text .= sprintf(plugin_lang_get('email_notification_bug_reported_by'), $reporterName, $reporterEmail);
                 $text .= "\n";
                 $text .= sprintf(plugin_lang_get('email_notification_bug_description'), $changeForCustomer['bug']->description);
                 $text .= "\n\n";
             }
             $customer = CustomerManagementDao::getCustomer($customer_id);
             $email = new EmailData();
             $email->email = $customer['email'];
             $email->subject = sprintf(plugin_lang_get('email_notification_title'), $customer['name'], $from, $to);
             $email->body = $text;
             $email->metadata['priority'] = config_get('mail_priority');
             $email->metadata['charset'] = 'utf-8';
             array_push($emails, $email);
         }
     }
     lang_pop();
     return $emails;
 }
开发者ID:WilfriedMartin,项目名称:customer-management,代码行数:53,代码来源:CustomerNotifier.php

示例11: prepare_user_name

function prepare_user_name($p_user_id)
{
    # Catch a user_id of NO_USER (like when a handler hasn't been assigned)
    if (NO_USER == $p_user_id) {
        return '';
    }
    $t_username = user_get_name($p_user_id);
    if (user_exists($p_user_id) && user_get_field($p_user_id, 'enabled')) {
        $t_email = user_get_email($p_user_id);
        if (!is_blank($t_email)) {
            return prepare_email_link($t_email, $t_username);
        } else {
            return string_display($t_username);
        }
    } else {
        $t_result = '<font STYLE="text-decoration: line-through">';
        $t_result .= string_display($t_username);
        $t_result .= '</font>';
        return $t_result;
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:21,代码来源:prepare_api.php

示例12: html

 /**
  * Returns html string to display
  * @return string
  */
 public function html()
 {
     $t_resolved = config_get('bug_resolved_status_threshold');
     $t_closed = config_get('bug_closed_status_threshold');
     if ($this->old_status < $t_closed && $this->new_status >= $t_closed) {
         $t_string = sprintf(lang_get('timeline_issue_closed'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id));
     } else {
         if ($this->old_status < $t_resolved && $this->new_status >= $t_resolved) {
             $t_string = sprintf(lang_get('timeline_issue_resolved'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id));
         } else {
             if ($this->old_status >= $t_resolved && $this->new_status < $t_resolved) {
                 $t_string = sprintf(lang_get('timeline_issue_reopened'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id));
             } else {
                 return '';
             }
         }
     }
     $t_html = $this->html_start();
     $t_html .= '<div class="action">' . $t_string . '</div>';
     $t_html .= $this->html_end();
     return $t_html;
 }
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:26,代码来源:IssueStatusChangeTimelineEvent.class.php

示例13: bugnote_get_all_bugnotes

     }
     $writer->endElement();
     # custom_fields
 }
 # fetch and export bugnotes
 $t_bugnotes = bugnote_get_all_bugnotes($t_row->id);
 if (is_array($t_bugnotes) && count($t_bugnotes) > 0) {
     $writer->startElement('bugnotes');
     foreach ($t_bugnotes as $t_bugnote) {
         $writer->startElement('bugnote');
         # id
         $writer->writeElement('id', $t_bugnote->id);
         # reporter
         $writer->startElement('reporter');
         $writer->writeAttribute('id', $t_bugnote->reporter_id);
         $writer->text(user_get_name($t_bugnote->reporter_id));
         $writer->endElement();
         # bug note
         $writer->writeElement('note', $t_bugnote->note);
         # view state
         $writer->startElement('view_state');
         $writer->writeAttribute('id', $t_bugnote->view_state);
         $writer->text(get_enum_element('view_state', $t_bugnote->view_state));
         $writer->endElement();
         # date submitted
         $writer->writeElement('date_submitted', $t_bugnote->date_submitted);
         # last modified
         $writer->writeElement('last_modified', $t_bugnote->last_modified);
         # note type
         $writer->writeElement('note_type', $t_bugnote->note_type);
         # note attr
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:export.php

示例14: prepare_user_name

 name="name" value="<?php 
echo $t_tag_row['name'];
?>
"/></td>
	<td><?php 
if (access_has_global_level(config_get('tag_edit_threshold'))) {
    if (ON == config_get('use_javascript')) {
        $t_username = prepare_user_name($t_tag_row['user_id']);
        echo ajax_click_to_edit($t_username, 'user_id', 'entrypoint=user_combobox&amp;user_id=' . $t_tag_row['user_id'] . '&amp;access_level=' . config_get('tag_create_threshold'));
    } else {
        echo '<select ', helper_get_tab_index(), ' name="user_id">';
        print_user_option_list($t_tag_row['user_id'], ALL_PROJECTS, config_get('tag_create_threshold'));
        echo '</select>';
    }
} else {
    echo user_get_name($t_tag_row['user_id']);
}
?>
</td>
	<td><?php 
echo print_date(config_get('normal_date_format'), db_unixtimestamp($t_tag_row['date_created']));
?>
 </td>
	<td><?php 
echo print_date(config_get('normal_date_format'), db_unixtimestamp($t_tag_row['date_updated']));
?>
 </td>
</tr>

<!-- spacer -->
<tr class="spacer">
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:tag_update_page.php

示例15: csv_format_handler_id

/**
 * returns the handler name corresponding to the supplied bug
 * @param object $p_bug the bug
 * @return string formatted user name
 * @access public
 */
function csv_format_handler_id($p_bug)
{
    if ($p_bug->handler_id > 0) {
        return csv_escape_string(user_get_name($p_bug->handler_id));
    }
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:12,代码来源:csv_api.php


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