diff options
author | Prashant S | 2015-11-09 16:39:35 +0530 |
---|---|---|
committer | Prashant S | 2015-11-09 16:39:35 +0530 |
commit | f87991224f571846fd9985e020da569cff5dff75 (patch) | |
tree | c6cc5bbe6b1564226c16edae22134891e64d908a | |
parent | 6611e4e33d21e9d06949ec1ec11630114673b19c (diff) | |
parent | 15c947d3841df48c1faa400100ddaf98627a3845 (diff) | |
download | DWSIM_lab_migration_module-f87991224f571846fd9985e020da569cff5dff75.tar.gz DWSIM_lab_migration_module-f87991224f571846fd9985e020da569cff5dff75.tar.bz2 DWSIM_lab_migration_module-f87991224f571846fd9985e020da569cff5dff75.zip |
Merge pull request #1 from FOSSEE/devel
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); |