diff options
author | prashant | 2015-11-09 16:13:15 +0530 |
---|---|---|
committer | prashant | 2015-11-09 16:13:15 +0530 |
commit | 15c947d3841df48c1faa400100ddaf98627a3845 (patch) | |
tree | c6cc5bbe6b1564226c16edae22134891e64d908a | |
parent | 6611e4e33d21e9d06949ec1ec11630114673b19c (diff) | |
download | DWSIM_lab_migration_module-15c947d3841df48c1faa400100ddaf98627a3845.tar.gz DWSIM_lab_migration_module-15c947d3841df48c1faa400100ddaf98627a3845.tar.bz2 DWSIM_lab_migration_module-15c947d3841df48c1faa400100ddaf98627a3845.zip |
added validation for lab proposal menu link
-rwxr-xr-x | proposal.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/proposal.inc b/proposal.inc index 5f097c1..af5fcd0 100755 --- a/proposal.inc +++ b/proposal.inc @@ -20,10 +20,15 @@ lab_migration_solution : approval_status 1 - Approved 2 - Disapproved (delete it) */ -function lab_migration_proposal_form($form, $form_state) +function lab_migration_proposal_form($form, &$form_state) { global $user; /************************ start approve book details ************************/ + if ($user->uid == 0) { + $msg = drupal_set_message(t('It is mandatory to ' . l('login', 'user') . ' on this website to access the lab proposal form. If you are new user please create a new account first.'), 'error'); + drupal_goto('lab-migration-project'); + return $msg; + } $query = db_select('lab_migration_proposal'); $query->fields('lab_migration_proposal'); $query->condition('uid', $user->uid); |