Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function freeway_user_mapping_non_global()
- {
- GLOBAL $user;
- $arrayNames = array();
- //Query to obtain the number of users
- $result = db_query("SELECT name FROM {users} ");
- $rows = mysql_num_rows($result);
- if($rows==0){
- drupal_set_message("There are curently no users!");
- drupal_goto('user/'.$user->uid.'/freewayNonGlobalUser');
- }
- else{
- while ($record = db_fetch_object($result))
- {
- $userVal = $record->name;
- $arrayNames[] = $userVal;
- }
- }
- for($i=1;$i<count($arrayNames);$i+=1){
- $form[$arrayNames[$i]] = array('#value' => $arrayNames[$i]);
- //$form[$fileId[$n]]['FileID'] = array('#value' => $fileId[$n]);
- }
- // user Theme Table for displaying the 3 columns.
- //submit action.
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement