[Vtigercrm-commits] [vtiger-commits] r6202 - /vtigercrm/trunk/modules/Users/CreateProfile1.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri May 19 16:42:31 EDT 2006


Author: don
Date: Fri May 19 14:42:27 2006
New Revision: 6202

Log:
duplicate check for profilename done

Modified:
    vtigercrm/trunk/modules/Users/CreateProfile1.php

Modified: vtigercrm/trunk/modules/Users/CreateProfile1.php
==============================================================================
--- vtigercrm/trunk/modules/Users/CreateProfile1.php (original)
+++ vtigercrm/trunk/modules/Users/CreateProfile1.php Fri May 19 14:42:27 2006
@@ -13,6 +13,26 @@
 
 require_once('include/database/PearDatabase.php');
 require_once('include/utils/utils.php');
+
+$profilename=$_REQUEST['profile_name'];
+
+if(isset($_REQUEST['dup_check']) && $_REQUEST['dup_check']!='')
+{
+        $query = 'select profilename from profile where profilename="'.$profilename.'"';
+        $result = $adb->query($query);
+
+        if($adb->num_rows($result) > 0)
+        {
+                echo 'A Profile in the specified name "'.$profilename.'" already exists';
+                die;
+        }else
+        {
+                echo 'SUCESS';
+                die;
+        }
+
+}
+
 
 global $theme;
 $theme_path="themes/".$theme."/";





More information about the vtigercrm-commits mailing list