예제 #1
0
 function user_login($user_ID, $link = true)
 {
     $UserCache =& get_UserCache();
     $User =& $UserCache->get_by_ID($user_ID, false, false);
     if ($User) {
         if ($link) {
             $login_text = get_user_identity_link($User->login, $User->ID, 'user', 'login');
             if ($User->check_status('is_closed')) {
                 // add (closed account) note to corresponding contacts!
                 $login_text .= '<span class="note">(' . T_('closed account') . ')</span>';
             }
             return $login_text;
         }
         return $User->login;
     }
     return '';
 }
예제 #2
0
/**
 * Get the user login
 * 
 * @param integer User ID
 * @param string User login
 */
function coll_perm_login($user_ID, $user_login)
{
    global $Blog;
    $user_login = get_user_identity_link($user_login, NULL, 'profile', 'avatar_login');
    if ($Blog->owner_user_ID == $user_ID) {
        $r = $user_login . ' (' . T_('Owner') . ')';
    } else {
        $r = $user_login;
    }
    return $r;
}
<?php

/**
 * This file implements the Item history details view
 *
 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $edited_Item, $Revision;
$post_statuses = get_visibility_statuses();
$Form = new Form(NULL, 'history', 'post', 'compact');
$Form->global_icon(T_('Cancel viewing!'), 'close', regenerate_url('action', 'action=history'));
$Form->begin_form('fform', sprintf(T_('Revision #%s for: %s'), $Revision->iver_ID == 0 ? '(' . T_('Current version') . ')' : $Revision->iver_ID, $edited_Item->get_title()));
$Form->info(T_('Date'), mysql2localedatetime($Revision->iver_edit_datetime, 'Y-m-d', 'H:i:s'));
$iver_editor_user_link = get_user_identity_link(NULL, $Revision->iver_edit_user_ID);
$Form->info(T_('User'), empty($iver_editor_user_link) ? T_('(deleted user)') : $iver_editor_user_link);
$Form->info(T_('Status'), $post_statuses[$Revision->iver_status]);
$Form->info(T_('Note'), $Revision->iver_ID > 0 ? T_('Archived version') : T_('Current version'));
$Form->info(T_('Title'), $Revision->iver_title);
$Form->info(T_('Content'), $Revision->iver_content);
$Form->end_form();
예제 #4
0
/**
 * display avatar and login linking to sessions list for user
 *
 * @param mixed $login
 */
function stat_session_login($login)
{
    if (empty($login)) {
        return '<span class="note">' . T_('Anon.') . '</span>';
    }
    return get_user_identity_link($login, NULL, 'admin');
}
예제 #5
0
/**
 * Get item version editor login with link to user profile
 * 
 * @param integer editor user ID
 * @return string user profile link or 'Deleted user' text if the user doesn't exist anymore
 */
function iver_editor_login($user_ID)
{
    $r = get_user_identity_link(NULL, $user_ID);
    if (empty($r)) {
        return T_('(deleted user)');
    }
    return $r;
}