function content_lock_lock_owner in Content locking (anti-concurrent editing) 7
Same name and namespace in other branches
- 6.2 content_lock.module \content_lock_lock_owner()
- 6 content_lock.module \content_lock_lock_owner()
- 7.3 content_lock.module \content_lock_lock_owner()
- 7.2 content_lock.module \content_lock_lock_owner()
Tell who has locked node.
Parameters
$lock: The lock for a node.
Return value
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 - Implement hook_node_validate() to check that the user is maintaining his lock.
File
- ./
content_lock.module, line 460 - 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,
));
}