当前位置: 首页>>代码示例>>PHP>>正文


PHP Employee::employeeExists方法代码示例

本文整理汇总了PHP中Employee::employeeExists方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::employeeExists方法的具体用法?PHP Employee::employeeExists怎么用?PHP Employee::employeeExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Employee的用法示例。


在下文中一共展示了Employee::employeeExists方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _childValidation

 protected function _childValidation()
 {
     $email = $this->getFieldValue($this->loadObject(true), 'email');
     if (!Validate::isEmail($email)) {
         $this->_errors[] = Tools::displayError('Invalid e-mail');
     } else {
         if (Employee::employeeExists($email) and !Tools::getValue('id_employee')) {
             $this->_errors[] = Tools::displayError('an account already exists for this e-mail address:') . ' ' . $email;
         }
     }
 }
开发者ID:sealence,项目名称:local,代码行数:11,代码来源:AdminEmployees.php

示例2: createSellerAccount

 public static function createSellerAccount($customer)
 {
     $toqkiomv = "customer";
     global $cookie;
     if (!Validate::isLoadedObject(${$toqkiomv})) {
         return;
     }
     require_once dirname(__FILE__) . "/SellerInfo.php";
     $sid = AgileSellerManager::getLinkedSellerID($customer->id);
     if ($sid > 0) {
         return;
     }
     ${${"GLOBALS"}["qkyaztoiww"]} = Address::getFirstCustomerAddressId($customer->id, true);
     $quvvpsbmm = "address";
     ${${"GLOBALS"}["ttgfmxhakl"]} = new Address(intval(${${"GLOBALS"}["qkyaztoiww"]}));
     if (!Validate::isLoadedObject(${$quvvpsbmm})) {
         $address->id_country = Configuration::get("PS_COUNTRY_DEFAULT");
     }
     if (Employee::employeeExists($customer->email)) {
         $ixpzflfvjdl = "emp";
         ${"GLOBALS"}["tuwsmwyun"] = "seller_emp";
         ${$ixpzflfvjdl} = new Employee();
         ${${"GLOBALS"}["tuwsmwyun"]} = $emp->getByEmail($customer->email);
     } else {
         $jdiwblvo = "seller_emp";
         ${$jdiwblvo} = new Employee();
         $seller_emp->firstname = $customer->firstname;
         $seller_emp->lastname = $customer->lastname;
         $seller_emp->email = $customer->email;
         $seller_emp->id_profile = (int) Configuration::get("AGILE_MS_PROFILE_ID");
         $seller_emp->active = intval(Configuration::get("AGILE_MS_SELLER_APPROVAL")) == 1 ? 0 : 1;
         $seller_emp->id_lang = $cookie->id_lang;
         $seller_emp->passwd = $customer->passwd;
         $seller_emp->default_tab = Tab::getIdFromClassName("AdminProducts");
         $seller_emp->bo_theme = "default";
         $seller_emp->optin = 0;
         $seller_emp->add();
     }
     AgileSellerManager::assignObjectOwner("customer", $customer->id, $seller_emp->id);
     ${"GLOBALS"}["pienutr"] = "customer";
     ${${"GLOBALS"}["atnqtpp"]} = self::createSellerInfo(${${"GLOBALS"}["pienutr"]}, ${${"GLOBALS"}["ttgfmxhakl"]}, ${${"GLOBALS"}["mbnicd"]});
     self::sendNewSellerAccountEmail($sellerinfo->id);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:43,代码来源:AgileMultipleSellerBase.php

示例3: _childValidation

 protected function _childValidation()
 {
     if (!($obj = $this->loadObject(true))) {
         return false;
     }
     if (Tools::getValue('id_profile') == _PS_ADMIN_PROFILE_ && $this->context->employee->id_profile != _PS_ADMIN_PROFILE_) {
         $this->errors[] = Tools::displayError('The provided profile is invalid');
     }
     $email = $this->getFieldValue($obj, 'email');
     if (Validate::isEmail($email) && Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int) Tools::getValue('id_employee'))) && $employee->email != $email)) {
         $this->errors[] = Tools::displayError('An account already exists for this email address:') . ' ' . $email;
     }
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:13,代码来源:AdminEmployeesController.php

示例4: _childValidation

 protected function _childValidation()
 {
     if (!($obj = $this->loadObject(true))) {
         return false;
     }
     $email = $this->getFieldValue($obj, 'email');
     if (Validate::isEmail($email) && Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int) Tools::getValue('id_employee'))) && $employee->email != $email)) {
         $this->errors[] = Tools::displayError('An account already exists for this email address:') . ' ' . $email;
     }
 }
开发者ID:WhisperingTree,项目名称:etagerca,代码行数:10,代码来源:AdminEmployeesController.php

示例5: Employee

    }
    if (is_array($employee->_errors) and count($employee->_errors) > 0) {
        $errors = $employee->_errors;
    } else {
        $_GET['id'] = $employee->id;
        UIAdminAlerts::conf('管理员已添加');
    }
}
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    $obj = new Employee($id);
}
if (Tools::P('saveEmployee') == 'edit') {
    if (Tools::P('passwd') != Tools::P('passwd_conf')) {
        $obj->_errors[] = '两次输入的密码不一样!';
    } elseif (Tools::P('email') != $obj->email && Employee::employeeExists(Tools::getRequest('email'))) {
        $obj->_errors[] = '邮箱地址已存在!';
    } elseif (Validate::isLoadedObject($obj)) {
        $obj->copyFromPost();
        $obj->update();
    }
    if (is_array($obj->_errors) and count($obj->_errors) > 0) {
        $errors = $obj->_errors;
    } else {
        UIAdminAlerts::conf('管理员已更新');
    }
}
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
开发者ID:yiuked,项目名称:tmcart,代码行数:31,代码来源:employee_edit.php

示例6: add_employee

 public static function add_employee($email, $password, $profile, $firstName, $lastName, $active = true, $optin = false, $defaultTab = 1, $boTheme = 'default', $boMenu = 1)
 {
     if (Employee::employeeExists($email)) {
         echo "Cannot add {$email}, this email address is already registered !\n";
         return false;
     }
     if (!Validate::isEmail($email)) {
         echo "email: {$email} is not a valid email address\n";
         return false;
     }
     if (!Validate::isPasswd($password, 1)) {
         echo "Provided password is not a valid password\n";
         return false;
     }
     if ($lastName == '') {
         echo "Last name cannot be empty !\n";
         return false;
     }
     if ($firstName == '') {
         echo "First name cannot be empty !\n";
         return false;
     }
     if (!Validate::isName($firstName)) {
         echo "{$firstName} is not a valid name\n";
         return false;
     }
     if (!Validate::isName($lastName)) {
         echo "{$lastName} is not a valid name\n";
         return false;
     }
     $employee = new Employee();
     $employee->firstname = $firstName;
     $employee->lastname = $lastName;
     $employee->email = $email;
     $employee->passwd = md5(_COOKIE_KEY_ . $password);
     $employee->last_passwd_gen = date('Y-m-d h:i:s', strtotime('-360 minutes'));
     $employee->bo_theme = $boTheme;
     $employee->default_tab = $defaultTab;
     $employee->active = $active;
     $employee->optin = $optin;
     $employee->id_profile = $profile;
     $employee->id_lang = Configuration::get('PS_LANG_DEFAULT');
     $employee->bo_menu = $boMenu;
     $res = $employee->add(true, true);
     if ($res) {
         echo "Successfully added user: {$email}\n";
         return true;
     } else {
         echo "Could not add user: {$email}\n";
         return false;
     }
 }
开发者ID:rodrisan,项目名称:ps-cli,代码行数:52,代码来源:employee.php


注:本文中的Employee::employeeExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。