You are here

function content_lock_lock_owner in Content locking (anti-concurrent editing) 7.2

Same name and namespace in other branches
  1. 6.2 content_lock.module \content_lock_lock_owner()
  2. 6 content_lock.module \content_lock_lock_owner()
  3. 7.3 content_lock.module \content_lock_lock_owner()
  4. 7 content_lock.module \content_lock_lock_owner()

Tell who has locked node.

Parameters

object $lock: The lock for a node.

Return value

string String with the message.

2 calls to content_lock_lock_owner()
content_lock_node in ./content_lock.module
Try to lock a document for editing.
content_lock_node_validate in ./content_lock.module
Implements hook_node_validate().

File

./content_lock.module, line 620
Allows users to lock documents for modification.

Code

function content_lock_lock_owner($lock) {
  $username = theme('username', array(
    'account' => user_load($lock->uid),
  ));
  $date = format_date($lock->timestamp, 'medium');
  return t('This document is locked for editing by !name since @date.', array(
    '!name' => $username,
    '@date' => $date,
  ));
}