From 15c947d3841df48c1faa400100ddaf98627a3845 Mon Sep 17 00:00:00 2001 From: prashant Date: Mon, 9 Nov 2015 16:13:15 +0530 Subject: added validation for lab proposal menu link --- proposal.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'proposal.inc') 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); -- cgit