本文整理汇总了PHP中ilObjUser::getInstitution方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjUser::getInstitution方法的具体用法?PHP ilObjUser::getInstitution怎么用?PHP ilObjUser::getInstitution使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjUser
的用法示例。
在下文中一共展示了ilObjUser::getInstitution方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHtml
/**
* Get HTML
*/
function getHtml()
{
global $tpl, $lng, $https;
$this->tpl = new ilTemplate("tpl.openlayers_map.html", true, true, "Services/Maps");
$lng->loadLanguageModule("maps");
$tpl->addJavaScript("Services/Maps/js/OpenLayers.js");
$tpl->addJavaScript("Services/Maps/js/ServiceOpenLayers.js");
// add user markers
$cnt = 0;
foreach ($this->user_marker as $user_id) {
if (ilObject::_exists($user_id)) {
$user = new ilObjUser($user_id);
if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
$this->tpl->setCurrentBlock("user_marker");
$this->tpl->setVariable("UMAP_ID", $this->getMapId());
$this->tpl->setVariable("CNT", $cnt);
$this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
$this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
$info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
$delim = "<br \\/>";
if ($user->getPref("public_institution") == "y") {
$info .= $delim . htmlspecialchars($user->getInstitution());
$delim = ", ";
}
if ($user->getPref("public_department") == "y") {
$info .= $delim . htmlspecialchars($user->getDepartment());
}
$delim = "<br \\/>";
if ($user->getPref("public_street") == "y") {
$info .= $delim . htmlspecialchars($user->getStreet());
}
if ($user->getPref("public_zip") == "y") {
$info .= $delim . htmlspecialchars($user->getZipcode());
$delim = " ";
}
if ($user->getPref("public_city") == "y") {
$info .= $delim . htmlspecialchars($user->getCity());
}
$delim = "<br \\/>";
if ($user->getPref("public_country") == "y") {
$info .= $delim . htmlspecialchars($user->getCountry());
}
$this->tpl->setVariable("USER_INFO", $info);
$this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
$this->tpl->parseCurrentBlock();
$cnt++;
}
}
}
$this->tpl->setVariable("MAP_ID", $this->getMapId());
$this->tpl->setVariable("WIDTH", $this->getWidth());
$this->tpl->setVariable("HEIGHT", $this->getHeight());
$this->tpl->setVariable("LAT", $this->getLatitude());
$this->tpl->setVariable("LONG", $this->getLongitude());
$this->tpl->setVariable("ZOOM", (int) $this->getZoom());
$nav_control = $this->getEnableNavigationControl() ? "true" : "false";
$this->tpl->setVariable("NAV_CONTROL", $nav_control);
$central_marker = $this->getEnableCentralMarker() ? "true" : "false";
$this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
$replace_marker = $this->getEnableUpdateListener() ? "true" : "false";
$this->tpl->setVariable("REPLACE_MARKER", $replace_marker);
$this->tpl->setVariable("INVALID_ADDRESS_STRING", $lng->txt("invalid_address"));
return $this->tpl->get();
}
示例2: importEndTag
//.........这里部分代码省略.........
$updateUser->readPrefs();
if ($this->currPassword != null) {
switch ($this->currPasswordType) {
case "ILIAS2":
$updateUser->setPasswd($this->currPassword, IL_PASSWD_CRYPT);
break;
case "ILIAS3":
$updateUser->setPasswd($this->currPassword, IL_PASSWD_MD5);
break;
case "PLAIN":
$updateUser->setPasswd($this->currPassword, IL_PASSWD_PLAIN);
$this->acc_mail->setUserPassword($this->currPassword);
break;
}
}
if (!is_null($this->userObj->getFirstname())) {
$updateUser->setFirstname($this->userObj->getFirstname());
}
if (!is_null($this->userObj->getLastname())) {
$updateUser->setLastname($this->userObj->getLastname());
}
if (!is_null($this->userObj->getUTitle())) {
$updateUser->setUTitle($this->userObj->getUTitle());
}
if (!is_null($this->userObj->getGender())) {
$updateUser->setGender($this->userObj->getGender());
}
if (!is_null($this->userObj->getEmail())) {
$updateUser->setEmail($this->userObj->getEmail());
}
if (!is_null($this->userObj->getBirthday())) {
$updateUser->setBirthday($this->userObj->getBirthday());
}
if (!is_null($this->userObj->getInstitution())) {
$updateUser->setInstitution($this->userObj->getInstitution());
}
if (!is_null($this->userObj->getStreet())) {
$updateUser->setStreet($this->userObj->getStreet());
}
if (!is_null($this->userObj->getCity())) {
$updateUser->setCity($this->userObj->getCity());
}
if (!is_null($this->userObj->getZipCode())) {
$updateUser->setZipCode($this->userObj->getZipCode());
}
if (!is_null($this->userObj->getCountry())) {
$updateUser->setCountry($this->userObj->getCountry());
}
if (!is_null($this->userObj->getPhoneOffice())) {
$updateUser->setPhoneOffice($this->userObj->getPhoneOffice());
}
if (!is_null($this->userObj->getPhoneHome())) {
$updateUser->setPhoneHome($this->userObj->getPhoneHome());
}
if (!is_null($this->userObj->getPhoneMobile())) {
$updateUser->setPhoneMobile($this->userObj->getPhoneMobile());
}
if (!is_null($this->userObj->getFax())) {
$updateUser->setFax($this->userObj->getFax());
}
if (!is_null($this->userObj->getHobby())) {
$updateUser->setHobby($this->userObj->getHobby());
}
if (!is_null($this->userObj->getComment())) {
$updateUser->setComment($this->userObj->getComment());
}
示例3: parseUserPlaceholders
/**
* Return all Placeholders of user data
*
* @param ilObjUser $user
* @return array
*/
protected function parseUserPlaceholders(ilObjUser $user)
{
return array('USER_LOGIN' => $this->anonymized ? 'johndoe' : $user->getLogin(), 'USER_TITLE' => $this->anonymized ? 'Mister' : $user->getUTitle(), 'USER_FULLNAME' => $this->anonymized ? 'John Doe' : $user->getFullname(), 'USER_FIRSTNAME' => $this->anonymized ? 'John' : $user->getFirstname(), 'USER_LASTNAME' => $this->anonymized ? 'Doe' : $user->getLastname(), 'USER_BIRTHDAY' => $user->getBirthday(), 'USER_INSTITUTION' => $user->getInstitution(), 'USER_DEPARTMENT' => $user->getDepartment(), 'USER_STREET' => $this->anonymized ? 'Manhattan Street' : $user->getStreet(), 'USER_CITY' => $this->anonymized ? 'New York' : $user->getCity(), 'USER_ZIPCODE' => $this->anonymized ? 10026 : $user->getZipcode(), 'USER_COUNTRY' => $this->anonymized ? 'USA' : $user->getCountry());
}
示例4: getHtml
/**
* Get HTML
*/
function getHtml()
{
global $tpl;
$this->tpl = new ilTemplate("tpl.google_map.html", true, true, "Services/GoogleMaps");
$tpl->addJavaScript("//maps.google.com/maps/api/js?sensor=false", false);
$tpl->addJavaScript("Services/GoogleMaps/js/ServiceGoogleMaps.js");
// add user markers
$cnt = 0;
foreach ($this->user_marker as $user_id) {
if (ilObject::_exists($user_id)) {
$user = new ilObjUser($user_id);
if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
$this->tpl->setCurrentBlock("user_marker");
$this->tpl->setVariable("UMAP_ID", $this->getMapId());
$this->tpl->setVariable("CNT", $cnt);
$this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
$this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
$info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
$delim = "<br \\/>";
if ($user->getPref("public_institution") == "y") {
$info .= $delim . htmlspecialchars($user->getInstitution());
$delim = ", ";
}
if ($user->getPref("public_department") == "y") {
$info .= $delim . htmlspecialchars($user->getDepartment());
}
$delim = "<br \\/>";
if ($user->getPref("public_street") == "y") {
$info .= $delim . htmlspecialchars($user->getStreet());
}
if ($user->getPref("public_zip") == "y") {
$info .= $delim . htmlspecialchars($user->getZipcode());
$delim = " ";
}
if ($user->getPref("public_city") == "y") {
$info .= $delim . htmlspecialchars($user->getCity());
}
$delim = "<br \\/>";
if ($user->getPref("public_country") == "y") {
$info .= $delim . htmlspecialchars($user->getCountry());
}
$this->tpl->setVariable("USER_INFO", $info);
$this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
$this->tpl->parseCurrentBlock();
$cnt++;
}
}
}
$this->tpl->setVariable("MAP_ID", $this->getMapId());
$this->tpl->setVariable("WIDTH", $this->getWidth());
$this->tpl->setVariable("HEIGHT", $this->getHeight());
$this->tpl->setVariable("LAT", $this->getLatitude());
$this->tpl->setVariable("LONG", $this->getLongitude());
$this->tpl->setVariable("ZOOM", (int) $this->getZoom());
$type_control = $this->getEnableTypeControl() ? "true" : "false";
$this->tpl->setVariable("TYPE_CONTROL", $type_control);
$nav_control = $this->getEnableNavigationControl() ? "true" : "false";
$this->tpl->setVariable("NAV_CONTROL", $nav_control);
$update_listener = $this->getEnableUpdateListener() ? "true" : "false";
$this->tpl->setVariable("UPDATE_LISTENER", $update_listener);
$large_map_control = $this->getEnableLargeMapControl() ? "true" : "false";
$this->tpl->setVariable("LARGE_CONTROL", $large_map_control);
$central_marker = $this->getEnableCentralMarker() ? "true" : "false";
$this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
return $this->tpl->get();
}
示例5: loadFromUser
/**
* Load user data from ilias user object
* @param stdclass $user
* @param ilObjUser $iu
*/
private function loadFromUser($user, ilObjUser $iu)
{
$prefix = ilViteroSettings::getInstance()->getUserPrefix();
$user->username = $prefix . $iu->getLogin();
$user->surname = $iu->getLastname();
$user->firstname = $iu->getFirstname();
$user->email = $iu->getEmail();
$user->company = $iu->getInstitution();
$user->locale = in_array($iu->getLanguage(), $this->available_locales) ? $iu->getLanguage() : "en";
#$user->timezone = trim($iu->getTimeZone());
$GLOBALS['ilLog']->write(__METHOD__ . ': Time zone is ' . $iu->getTimeZone());
$user->phone = $iu->getPhoneOffice();
$user->fax = $iu->getFax();
$user->mobile = $iu->getPhoneMobile();
$user->country = $iu->getCountry();
$user->zip = $iu->getZipcode();
$user->city = $iu->getCity();
$user->street = $iu->getStreet();
}