Skip to content

Commit 11df68f

Browse files
author
y
committed
Username shows on admin page
1 parent 638d4b9 commit 11df68f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

shrtr.install

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ function shrtr_schema() {
3131
'not null' => TRUE,
3232
'default' => 0,
3333
),
34+
'name' => array(
35+
'description' => 'Username',
36+
'type' => 'text',
37+
'not null' => TRUE,
38+
'length' => 256,
39+
),
3440
'expire' => array(
3541
'description' => 'Expire time',
3642
'type' => 'int',

shrtr.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function shrtr_new_form_submit($form, &$form_state) {
118118
$record = array(
119119
'url' => $form_state['values']['url'],
120120
'uid' => $user->uid,
121+
'name' => $user->name,
121122
'created' => REQUEST_TIME,
122123
'expire' => $expire,
123124
'alias' => $alias,
@@ -218,7 +219,7 @@ function shrtr_urls_admin() {
218219
$row = array();
219220
$row[] = $url['id'];
220221
$row[] = $url['enabled'];
221-
$row[] = $url['uid'];
222+
$row[] = $url['name'];
222223
$row[] = l($url['url'], $url['url']);
223224
$row[] = l($new_url, $new_url);
224225
$row[] = format_date($url['created']);

0 commit comments

Comments
 (0)