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


PHP Person::getEmail方法代码示例

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


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

示例1: email

 public function email()
 {
     if ($this->exists("LOGIN-email")) {
         return $this->getVariable("LOGIN-email");
     } else {
         $id = parent::getEmail();
         $this->addVariable("LOGIN-email", $id);
         return $id;
     }
 }
开发者ID:patrickbraud,项目名称:CapstoneProject,代码行数:10,代码来源:SessionPerson.php

示例2: Main

 function Main()
 {
     switch ($this->formArray["ownerType"]) {
         case "Person":
             $this->tpl->set_block("rptsTemplate", "CompanyDetails", "CompanyDetailsBlock");
             $this->tpl->set_var("CompanyDetailsBlock", "");
             $person = new Person();
             $person->selectRecord($this->formArray["id"]);
             $this->tpl->set_var("id", $person->getPersonID());
             $this->tpl->set_var("lastName", $person->getLastName());
             $this->tpl->set_var("firstName", $person->getFirstName());
             $this->tpl->set_var("middleName", $person->getMiddleName());
             $this->tpl->set_var("gender", $person->getGender());
             $this->tpl->set_var("birthday", $person->getBirthday());
             $this->tpl->set_var("maritalStatus", $person->getMaritalStatus());
             $this->tpl->set_var("tin", $person->getTin());
             $address = $person->addressArray[0];
             if (is_a($address, Address)) {
                 $this->tpl->set_var("fullAddress", $address->getFullAddress());
             }
             $this->tpl->set_var("telephone", $person->getTelephone());
             $this->tpl->set_var("mobileNumber", $person->getMobileNumber());
             $this->tpl->set_var("email", $person->getEmail());
             break;
         case "Company":
             $this->tpl->set_block("rptsTemplate", "PersonDetails", "PersonDetailsBlock");
             $this->tpl->set_var("PersonDetailsBlock", "");
             $company = new Company();
             $company->selectRecord($this->formArray["id"]);
             $this->tpl->set_var("id", $company->getCompanyID());
             $this->tpl->set_var("companyName", $company->getCompanyName());
             $this->tpl->set_var("tin", $company->getTin());
             $this->tpl->set_var("telephone", $company->getTelephone());
             $this->tpl->set_var("fax", $company->getFax());
             $address = $company->addressArray[0];
             if (is_a($address, Address)) {
                 $this->tpl->set_var("fullAddress", $address->getFullAddress());
             }
             $this->tpl->set_var("email", $company->getEmail());
             $this->tpl->set_var("website", $company->getWebsite());
             break;
         default:
             exit("No Person/Company selected. <a href='OwnerList.php" . $this->sess->url("") . "'>Click here</a> to go back to the Owner List.");
             break;
     }
     $this->tpl->set_var("ownerType", $this->formArray["ownerType"]);
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
     $this->setPageDetailPerms();
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
开发者ID:armic,项目名称:erpts,代码行数:54,代码来源:OwnerDetails.php

示例3: postSendEmail

 public function postSendEmail($p, $z)
 {
     $person = new Person($p[1]);
     $token = $person->generateToken('resetPassword');
     $message = new GuiMessage();
     $message->setFrom('thesystem@rickgigger.com', 'The System');
     $message->addTo($person->getEmail(), $person->getName());
     $message->setSubject('password reset');
     $message->assign('token', $token);
     $message->send('messages/setPassword.tpl');
     die;
 }
开发者ID:rgigger,项目名称:zinc,代码行数:12,代码来源:ZoneUser.php

示例4: register

 public function register($postArr)
 {
     $status = false;
     $firstName = $postArr['firstname'];
     $lastName = $postArr['lastname'];
     if ($postArr['institution'] && !trim(strpos($postArr['institution'], ' ')) && preg_match('/[a-z]+[A-Z]+[a-z]+[A-Z]+/', $postArr['institution'])) {
         if ($postArr['title'] && !trim(strpos($postArr['title'], ' ')) && preg_match('/[a-z]+[A-Z]+[a-z]+[A-Z]+/', $postArr['title'])) {
             return false;
         }
     }
     $person = new Person();
     $person->setPassword($postArr['pwd']);
     $person->setUserName($this->userName);
     $person->setFirstName($firstName);
     $person->setLastName($lastName);
     $person->setTitle($postArr['title']);
     $person->setInstitution($postArr['institution']);
     $person->setCity($postArr['city']);
     $person->setState($postArr['state']);
     $person->setZip($postArr['zip']);
     $person->setCountry($postArr['country']);
     $person->setEmail($postArr['emailaddr']);
     $person->setUrl($postArr['url']);
     $person->setBiography($postArr['biography']);
     $person->setIsPublic(isset($postArr['ispublic']) ? 1 : 0);
     //Add to users table
     $fields = 'INSERT INTO users (';
     $values = 'VALUES (';
     $fields .= 'firstname ';
     $values .= '"' . $this->cleanInStr($person->getFirstName()) . '"';
     $fields .= ', lastname';
     $values .= ', "' . $this->cleanInStr($person->getLastName()) . '"';
     if ($person->getTitle()) {
         $fields .= ', title';
         $values .= ', "' . $this->cleanInStr($person->getTitle()) . '"';
     }
     if ($person->getInstitution()) {
         $fields .= ', institution';
         $values .= ', "' . $this->cleanInStr($person->getInstitution()) . '"';
     }
     if ($person->getDepartment()) {
         $fields .= ', department';
         $values .= ', "' . $this->cleanInStr($person->getDepartment()) . '"';
     }
     if ($person->getAddress()) {
         $fields .= ', address';
         $values .= ', "' . $this->cleanInStr($person->getAddress()) . '"';
     }
     if ($person->getCity()) {
         $fields .= ', city';
         $values .= ', "' . $this->cleanInStr($person->getCity()) . '"';
     }
     $fields .= ', state';
     $values .= ', "' . $this->cleanInStr($person->getState()) . '"';
     $fields .= ', country';
     $values .= ', "' . $this->cleanInStr($person->getCountry()) . '"';
     if ($person->getZip()) {
         $fields .= ', zip';
         $values .= ', "' . $this->cleanInStr($person->getZip()) . '"';
     }
     if ($person->getPhone()) {
         $fields .= ', phone';
         $values .= ', "' . $this->cleanInStr($person->getPhone()) . '"';
     }
     if ($person->getEmail()) {
         $fields .= ', email';
         $values .= ', "' . $this->cleanInStr($person->getEmail()) . '"';
     }
     if ($person->getUrl()) {
         $fields .= ', url';
         $values .= ', "' . $person->getUrl() . '"';
     }
     if ($person->getBiography()) {
         $fields .= ', biography';
         $values .= ', "' . $this->cleanInStr($person->getBiography()) . '"';
     }
     if ($person->getIsPublic()) {
         $fields .= ', ispublic';
         $values .= ', ' . $person->getIsPublic();
     }
     $sql = $fields . ') ' . $values . ')';
     //echo "SQL: ".$sql;
     $editCon = $this->getConnection('write');
     if ($editCon->query($sql)) {
         $person->setUid($editCon->insert_id);
         $this->uid = $person->getUid();
         //Add userlogin
         $sql = 'INSERT INTO userlogin (uid, username, password) ' . 'VALUES (' . $person->getUid() . ', "' . $this->cleanInStr($person->getUserName()) . '", PASSWORD("' . $this->cleanInStr($person->getPassword()) . '"))';
         if ($editCon->query($sql)) {
             $status = true;
             //authenicate
             $this->userName = $person->getUserName();
             $this->displayName = $person->getFirstName();
             $this->reset();
             $this->setCookies();
         } else {
             $this->errorStr = 'FAILED: Unable to create user.<div style="margin-left:55px;">Please contact system administrator for assistance.</div>';
         }
     }
     $editCon->close();
//.........这里部分代码省略.........
开发者ID:jphilip124,项目名称:Symbiota,代码行数:101,代码来源:ProfileManager.php

示例5: Main

 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
             if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $person = new Person();
                     $person->parseDomDocument($domDoc);
                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $person->getBirthday());
                     $this->formArray["personID"] = $person->getPersonID();
                     $this->formArray["lastName"] = $person->getLastName();
                     $this->formArray["firstName"] = $person->getFirstName();
                     $this->formArray["middleName"] = $person->getMiddleName();
                     $this->formArray["gender"] = $person->getGender();
                     $this->formArray["birth_year"] = removePreZero($dateArr["year"]);
                     $this->formArray["birth_month"] = removePreZero($dateArr["month"]);
                     $this->formArray["birth_day"] = removePreZero($dateArr["day"]);
                     $this->formArray["maritalStatus"] = $person->getMaritalStatus();
                     $this->formArray["tin"] = $person->getTin();
                     $address = $person->addressArray[0];
                     if (is_a($address, Address)) {
                         $this->formArray["addressID"] = $address->getAddressID();
                         $this->formArray["number"] = $address->getNumber();
                         $this->formArray["street"] = $address->getStreet();
                         $this->formArray["barangay"] = $address->getBarangay();
                         $this->formArray["district"] = $address->getDistrict();
                         $this->formArray["municipalityCity"] = $address->getMunicipalitycity();
                         $this->formArray["province"] = $address->getProvince();
                     }
                     $this->formArray["telephone"] = $person->getTelephone();
                     $this->formArray["mobileNumber"] = $person->getMobileNumber();
                     $this->formArray["email"] = $person->getEmail();
                 }
             }
             break;
         case "save":
             $PersonEncode = new SoapObject(NCCBIZ . "PersonEncode.php", "urn:Object");
             if ($this->formArray["personID"] != "") {
                 $PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
                 if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "record not found");
                 } else {
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                         $this->tpl->set_var("TableBlock", "error xmlDoc");
                     } else {
                         $person = new Person();
                         $person->parseDomDocument($domDoc);
                         $address = $person->addressArray[0];
                         if (is_a($address, Address)) {
                             $address->setAddressID($this->formArray["addressID"]);
                             $address->setNumber($this->formArray["number"]);
                             $address->setStreet($this->formArray["street"]);
                             $address->setBarangay($this->formArray["barangay"]);
                             $address->setDistrict($this->formArray["district"]);
                             $address->setMunicipalityCity($this->formArray["municipalityCity"]);
                             $address->setProvince($this->formArray["province"]);
                             $address->setDomDocument();
                         }
                         $person->setPersonID($this->formArray["personID"]);
                         $person->setLastName($this->formArray["lastName"]);
                         $person->setFirstName($this->formArray["firstName"]);
                         $person->setMiddleName($this->formArray["middleName"]);
                         $person->setGender($this->formArray["gender"]);
                         $person->setBirthday($this->birthdate);
                         $person->setMaritalStatus($this->formArray["maritalStatus"]);
                         $person->setTin($this->formArray["tin"]);
                         $person->setAddressArray($address);
                         $person->setTelephone($this->formArray["telephone"]);
                         $person->setMobileNumber($this->formArray["mobileNumber"]);
                         $person->setEmail($this->formArray["email"]);
                         $person->setDomDocument();
                         $doc = $person->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         if (!($ret = $PersonEncode->updatePerson($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $address = new Address();
                 $address->setNumber($this->formArray["number"]);
                 $address->setStreet($this->formArray["street"]);
                 $address->setBarangay($this->formArray["barangay"]);
                 $address->setDistrict($this->formArray["district"]);
                 $address->setMunicipalityCity($this->formArray["municipalityCity"]);
                 $address->setProvince($this->formArray["province"]);
                 $address->setDomDocument();
                 $person = new Person();
                 $person->setPersonID($this->formArray["personID"]);
                 $person->setLastName($this->formArray["lastName"]);
                 $person->setFirstName($this->formArray["firstName"]);
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:ChangeOfOwnershipPersonEncode.php

示例6: Main

 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $UserDetails = new SoapObject(NCCBIZ . "UserDetails.php", "urn:Object");
             if (!($xmlStr = $UserDetails->getUserDetails($this->formArray["userID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "User record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $user = new User();
                     $user->parseDomDocument($domDoc);
                     $this->formArray["userID"] = $user->getUserID();
                     $this->formArray["userType"] = $user->getUserType();
                     $this->formArray["username"] = $user->getUsername();
                     $this->formArray["password"] = $user->getPassword();
                     $this->formArray["personID"] = $user->getPersonID();
                     $this->formArray["status"] = $user->getStatus();
                 }
             }
             $PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
             if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "Person record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $person = new Person();
                     $person->parseDomDocument($domDoc);
                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $person->getBirthday());
                     $this->formArray["personID"] = $person->getPersonID();
                     $this->formArray["lastName"] = $person->getLastName();
                     $this->formArray["firstName"] = $person->getFirstName();
                     $this->formArray["middleName"] = $person->getMiddleName();
                     $this->formArray["gender"] = $person->getGender();
                     $this->formArray["birth_year"] = removePreZero($dateArr["year"]);
                     $this->formArray["birth_month"] = removePreZero($dateArr["month"]);
                     $this->formArray["birth_day"] = removePreZero($dateArr["day"]);
                     $this->formArray["maritalStatus"] = $person->getMaritalStatus();
                     $this->formArray["tin"] = $person->getTin();
                     $address = $person->addressArray[0];
                     if (is_a($address, Address)) {
                         $this->formArray["addressID"] = $address->getAddressID();
                         $this->formArray["number"] = $address->getNumber();
                         $this->formArray["street"] = $address->getStreet();
                         $this->formArray["barangay"] = $address->getBarangay();
                         $this->formArray["district"] = $address->getDistrict();
                         $this->formArray["municipalityCity"] = $address->getMunicipalitycity();
                         $this->formArray["province"] = $address->getProvince();
                     }
                     $this->formArray["telephone"] = $person->getTelephone();
                     $this->formArray["mobileNumber"] = $person->getMobileNumber();
                     $this->formArray["email"] = $person->getEmail();
                 }
             }
             $this->tpl->set_block("rptsTemplate", "NewUserPassword", "NewUserPasswordBlock");
             $this->tpl->set_var("NewUserPasswordBlock", "");
             $this->tpl->set_block("rptsTemplate", "OldUserPassword", "OldUserPasswordBlock");
             $this->tpl->set_var("oldNewUserRowspan", 5);
             //$this->tpl->set_var("oldNewUserRowspan", 3);
             $this->tpl->parse("OldUserPasswordBlock", "OldUserPassword", true);
             break;
         case "save":
             /*
             			    if($this->isOldPasswordCorrect()==false){
             			        $this->message = "Error. Cannot Save. Old password incorrect to create new password.";
             		    	    $this->tpl->set_var("message", $this->message);	
             		    	    $this->tpl->parse("MessageBlock", "Message", true);
             		    	    
                                 $this->tpl->set_block("rptsTemplate", "NewUserPassword", "NewUserPasswordBlock");
                                 $this->tpl->set_var("NewUserPasswordBlock", "");
             
                                 $this->tpl->set_block("rptsTemplate", "OldUserPassword", "OldUserPasswordBlock");
                                 $this->tpl->set_var("oldNewUserRowspan", 3);
                                 $this->tpl->parse("OldUserPasswordBlock", "OldUserPassword", true);		    	
             		    	    break;
             			    }
             */
             if ($this->formArray["newPassword"] != "" && $this->formArray["newPassword"] != "null") {
                 $this->formArray["password"] = md5($this->formArray["newPassword"]);
             }
             if ($this->usernameAlreadyExists() == true) {
                 $this->message = "Error. Cannot Save. Username already exists.";
                 $this->tpl->set_var("message", $this->message);
                 $this->tpl->parse("MessageBlock", "Message", true);
                 $this->tpl->set_block("rptsTemplate", "NewUserPassword", "NewUserPasswordBlock");
                 $this->tpl->set_block("rptsTemplate", "OldUserPassword", "OldUserPasswordBlock");
                 if ($this->formArray["personID"] != "") {
                     $this->tpl->set_var("NewUserPasswordBlock", "");
                     $this->tpl->set_var("oldNewUserRowspan", 3);
                     $this->tpl->parse("OldUserPasswordBlock", "OldUserPassword", true);
                 } else {
                     $this->tpl->set_var("oldNewUserRowspan", 2);
                     $this->tpl->parse("NewUserPasswordBlock", "NewUserPassword", true);
                     $this->tpl->set_var("OldUserPasswordBlock", "");
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:UserEncode.php

示例7: equals

 /**
  * @param Person $person
  *
  * @return bool
  */
 public function equals(Person $person)
 {
     return $person->getName() === $this->name && $person->getEmail() === $this->email;
 }
开发者ID:sgomez,项目名称:mailcatcher,代码行数:9,代码来源:Person.php

示例8: Main

 function Main($referer = "")
 {
     //if (trim($referer) == "" || !isset($referer))
     $referer = "OwnerList.php";
     $this->tpl->set_var("referer", $referer);
     switch ($this->formArray["formAction"]) {
         case "save" || "view" || "viewOnly":
             $this->tpl->set_var("referer", $referer);
             $PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
             if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $person = new Person();
                     $person->parseDomDocument($domDoc);
                     $this->formArray["personID"] = $person->getPersonID();
                     $this->formArray["personName"] = $person->getFullName();
                     $this->formArray["lastName"] = $person->getLastName();
                     $this->formArray["firstName"] = $person->getFirstName();
                     $this->formArray["middleName"] = $person->getMiddleName();
                     $this->formArray["gender"] = $person->getGender();
                     $this->formArray["birthday"] = $person->getBirthday();
                     $this->formArray["maritalStatus"] = $person->getMaritalStatus();
                     $this->formArray["tin"] = $person->getTin();
                     $address = $person->addressArray[0];
                     if (is_a($address, Address)) {
                         $this->formArray["number"] = $address->getNumber();
                         $this->formArray["street"] = $address->getStreet();
                         $this->formArray["barangay"] = $address->getBarangay();
                         $this->formArray["district"] = $address->getDistrict();
                         $this->formArray["municipalityCity"] = $address->getMunicipalitycity();
                         $this->formArray["province"] = $address->getProvince();
                     }
                     $this->formArray["telephone"] = $person->getTelephone();
                     $this->formArray["mobileNumber"] = $person->getMobileNumber();
                     $this->formArray["email"] = $person->getEmail();
                 }
             }
             if ($this->formArray["formAction"] == "viewOnly") {
                 $this->tpl->set_block("rptsTemplate", "ViewOnly", "ViewOnlyBlock");
                 $this->tpl->set_var("ViewOnlyBlock", "");
             }
             break;
         case "cancel":
             //header("location: PersonList.php");
             exit;
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
             $this->tpl->set_var("ACKBlock", "");
     }
     //*/
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
开发者ID:armic,项目名称:erpts,代码行数:62,代码来源:PersonDetails.php


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