title: Populate username in the select list ( CCK )
body: <p>How do populate username's in the select list. i added below code in the Allowed list textbox. But select list showing the PHP code instead of usernames.</p>
  
  <pre><code>global $user;
  $sql = "SELECT name FROM  users";
  $res = db_query($sql);
  while($row = db_fetch_array($res)){
  $rows[] = $row['name'];
  }
  return $rows;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/D8BhS.jpg" alt="enter image description here"></p>
  
  <p>Note: Application running in D7.
  As well i just followed below steps also.</p>
  
  <pre><code>Enable Core module PHP Filter.
  Set/Check user permissions: admin/people/permissions#module-php.
  Set/Check Text Formats: admin/config/content/formats.
  Enable CCK Module. This step is often overlooked. However without CCK Module enabled you wont be able to enter (and thus execute) PHP-code in the Allowed-Values-List window
  </code></pre>