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


PHP ilObjUser::_lookupId方法代码示例

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


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

示例1: ilObjectStatusGUI

 /**
  * Constructor
  * @access	public
  */
 function ilObjectStatusGUI(&$a_obj)
 {
     global $ilUser, $ilCtrl, $ilias, $ilErr, $lng, $rbacreview;
     $this->ctrl =& $ilCtrl;
     $this->object =& $a_obj;
     $this->tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl");
     $this->tpl->setVariable("INFO_REMARK_INTERRUPTED", $lng->txt('info_remark_interrupted'));
     if (empty($_POST['Fuserid'])) {
         $this->user =& $ilUser;
     } else {
         if ($_POST['Fselect_type'] == "id") {
             $this->user = $ilias->obj_factory->getInstanceByObjId($_POST['Fuserid'], false);
         } else {
             include_once 'Services/User/classes/class.ilObjUser.php';
             $user_id = ilObjUser::_lookupId($_POST['Fuserid']);
             $this->user = $ilias->obj_factory->getInstanceByObjId($user_id, false);
         }
         if ($this->user === false or $this->user->getType() != 'usr') {
             $this->user =& $ilUser;
             ilUtil::sendFailure($lng->txt('info_err_user_not_exist'));
         } else {
             ilUtil::sendInfo($lng->txt('info_user_view_changed'));
         }
     }
     // get all user roles and all valid roles in scope
     $this->user_roles = $rbacreview->assignedRoles($this->user->getId());
     $this->global_roles = $rbacreview->getGlobalRoles();
     $this->valid_roles = $rbacreview->getParentRoleIds($this->object->getRefId());
     $this->assigned_valid_roles = $this->getAssignedValidRoles();
     $this->getPermissionInfo();
     $this->getRoleAssignmentInfo();
     $this->getObjectSummary();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:37,代码来源:class.ilObjectStatusGUI.php

示例2: changeOwner

 function changeOwner()
 {
     global $rbacsystem, $ilObjDataCache;
     if (!($user_id = ilObjUser::_lookupId($_POST['owner']))) {
         ilUtil::sendFailure($this->lng->txt('user_not_known'));
         $this->owner();
         return true;
     }
     // no need to change?
     if ($user_id != $this->gui_obj->object->getOwner()) {
         $this->gui_obj->object->setOwner($user_id);
         $this->gui_obj->object->updateOwner();
         $ilObjDataCache->deleteCachedEntry($this->gui_obj->object->getId());
         include_once "Services/AccessControl/classes/class.ilRbacLog.php";
         if (ilRbacLog::isActive()) {
             ilRbacLog::add(ilRbacLog::CHANGE_OWNER, $this->gui_obj->object->getRefId(), array($user_id));
         }
     }
     ilUtil::sendSuccess($this->lng->txt('owner_updated'), true);
     if (!$rbacsystem->checkAccess("edit_permission", $this->gui_obj->object->getRefId())) {
         $this->ctrl->redirect($this->gui_obj);
         return true;
     }
     $this->ctrl->redirect($this, 'owner');
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilPermission2GUI.php

示例3: send

    /**
     * 
     * Send notifications	 
     *  
     * @access	public
     *  
     */
    public function send()
    {
        global $ilDB;
        // parent::send();
        if (count($this->getRecipients())) {
            $res = $ilDB->queryf("SELECT u.usr_id,u.gender,u.firstname,u.lastname,u.login,u.email,u.last_login,u.active," . "u.time_limit_unlimited, " . $ilDB->fromUnixtime("u.time_limit_from") . ", " . $ilDB->fromUnixtime("u.time_limit_until") . "," . "CASE WHEN u.active = 0 THEN '0001-01-01' ELSE CASE WHEN u.time_limit_unlimited=1 THEN '9999-12-31' ELSE " . $ilDB->fromUnixtime("u.time_limit_until") . " END END access_until," . " CASE WHEN " . $ilDB->unixTimestamp() . " BETWEEN u.time_limit_from AND u.time_limit_until THEN 0 ELSE 1 END expired," . "rq.role_disk_quota, system_role.rol_id role_id, " . "p1.value+0 user_disk_quota," . "p2.value+0 disk_usage, " . "p3.value last_update, " . "p5.value language, " . "CASE WHEN rq.role_disk_quota>p1.value+0 OR p1.value IS NULL THEN rq.role_disk_quota ELSE p1.value+0 END disk_quota\t" . "FROM usr_data u  " . "JOIN (SELECT u.usr_id usr_id,MAX(rd.disk_quota) role_disk_quota " . "FROM usr_data u " . "JOIN rbac_ua ua ON ua.usr_id=u.usr_id " . "JOIN rbac_fa fa ON fa.rol_id=ua.rol_id AND fa.parent=%s  " . "JOIN role_data rd ON rd.role_id=ua.rol_id WHERE u.usr_id=ua.usr_id GROUP BY u.usr_id) rq ON rq.usr_id=u.usr_id " . "LEFT JOIN rbac_ua system_role ON system_role.usr_id=u.usr_id AND system_role.rol_id = %s " . "LEFT JOIN usr_pref p1 ON p1.usr_id=u.usr_id AND p1.keyword = 'disk_quota'  " . "LEFT JOIN usr_pref p2 ON p2.usr_id=u.usr_id AND p2.keyword = 'disk_usage'  " . "LEFT JOIN usr_pref p3 ON p3.usr_id=u.usr_id AND p3.keyword = 'disk_usage.last_update'  " . "LEFT JOIN usr_pref p5 ON p5.usr_id=u.usr_id AND p5.keyword = 'language'  " . 'WHERE (((p1.value+0 > rq.role_disk_quota OR rq.role_disk_quota IS NULL) AND p2.value+0 > p1.value+0) OR 
					((rq.role_disk_quota > p1.value+0 OR p1.value IS NULL) AND p2.value+0 > rq.role_disk_quota)) ' . 'AND (u.active=1 AND (u.time_limit_unlimited = 1 OR ' . $ilDB->unixTimestamp() . ' BETWEEN u.time_limit_from AND u.time_limit_until)) ', array('integer', 'integer'), array(ROLE_FOLDER_ID, SYSTEM_ROLE_ID));
            $users = array();
            $counter = 0;
            while ($row = $ilDB->fetchAssoc($res)) {
                $details = ilDiskQuotaChecker::_lookupDiskUsage($row['usr_id']);
                $users[$counter]['disk_quota'] = $row['disk_quota'];
                $users[$counter]['disk_usage'] = $details['disk_usage'];
                $users[$counter]['email'] = $row['email'];
                $users[$counter]['firstname'] = $row['firstname'];
                $users[$counter]['lastname'] = $row['lastname'];
                ++$counter;
            }
            if (count($users)) {
                foreach ($this->getRecipients() as $rcp) {
                    $usrId = ilObjUser::_lookupId($rcp);
                    $this->initLanguage($usrId);
                    $this->initMail();
                    $this->setSubject($this->getLanguage()->txt('disk_quota_summary_subject'));
                    $this->setBody(ilMail::getSalutation($usrId, $this->getLanguage()));
                    $this->appendBody("\n\n");
                    $this->appendBody($this->getLanguage()->txt('disk_quota_exceeded_headline'));
                    $this->appendBody("\n\n");
                    $first = true;
                    $counter = 0;
                    $numUsers = count($users);
                    foreach ($users as $user) {
                        if (!$first) {
                            $this->appendBody("\n---------------------------------------------------\n\n");
                        }
                        $this->appendBody($this->getLanguage()->txt('fullname') . ': ' . $user['lastname'] . ', ' . $user['firstname'] . "\n");
                        $this->appendBody($this->getLanguage()->txt('email') . ': ' . $user['email'] . "\n");
                        $this->appendBody($this->getLanguage()->txt('disk_quota') . ': ' . ilFormat::formatSize($user['disk_quota'], 'short', $this->getLanguage()) . "\n");
                        $this->appendBody($this->getLanguage()->txt('currently_used_disk_space') . ': ' . ilFormat::formatSize($user['disk_usage'], 'short', $this->getLanguage()) . "\n");
                        $this->appendBody($this->getLanguage()->txt('usrf_profile_link') . ': ' . ilUtil::_getHttpPath() . '/goto.php?target=usrf&client_id=' . CLIENT_ID);
                        if ($counter < $numUsers - 1) {
                            $this->appendBody("\n");
                        }
                        ++$counter;
                        $first = false;
                    }
                    $this->getMail()->appendInstallationSignature(true);
                    $this->sendMail(array($rcp), array('system'), false);
                }
            }
        }
    }
开发者ID:arlendotcn,项目名称:ilias,代码行数:59,代码来源:class.ilDiskQuotaSummaryNotification.php

示例4: loginObserver

 /** 
  * Called from fetchData after successful login.
  *
  * @param string username
  */
 public function loginObserver($a_username, $a_auth)
 {
     $usr_id = ilObjUser::_lookupId($a_username);
     $auth_mode = ilObjUser::_lookupAuthMode($usr_id);
     $auth_id = ilAuthUtils::_getAuthMode($auth_mode);
     $GLOBALS['ilLog']->write(__METHOD__ . ': auth id =  ' . $auth_id);
     switch ($auth_id) {
         case AUTH_LOCAL:
             return true;
         default:
             if (ilAuthUtils::isPasswordModificationEnabled($auth_id)) {
                 return true;
             }
     }
     $a_auth->status = AUTH_WRONG_LOGIN;
     $a_auth->logout();
     return false;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:23,代码来源:class.ilAuthContainerMDB2.php

示例5: _sendNotificationToVATAdministration

 /**
  * Sends a notification message to all users responsible for vat assignment.
  * 
  * @access	public
  * @static
  * @param	ilPaymentObject $oPaymentObject
  */
 public static function _sendNotificationToVATAdministration($oPaymentObject)
 {
     global $ilSetting, $lng, $ilClientIniFile;
     $payment_vat_admins = $ilSetting->get('payment_vat_admins');
     $users = explode(',', $payment_vat_admins);
     $subject = $lng->txt('payment_vat_assignment_notification_subject');
     $tmp_obj = ilObjectFactory::getInstanceByRefId($oPaymentObject->getRefId());
     $message = sprintf($lng->txt('payment_vat_assignment_notification_body'), $tmp_obj->getTitle()) . "\n\n";
     $message .= "------------------------------------------------------------\n";
     $message .= sprintf($lng->txt('payment_vat_assignment_notification_intro'), $ilClientIniFile->readVariable('client', 'name'), ILIAS_HTTP_PATH . '/?client_id=' . CLIENT_ID);
     include_once 'Services/Mail/classes/class.ilMail.php';
     $mail_obj = new ilMail(ANONYMOUS_USER_ID);
     foreach ((array) $users as $login) {
         if (strlen(trim($login)) && (int) ilObjUser::_lookupId(trim($login))) {
             $success = $mail_obj->sendMail(trim($login), '', '', $subject, $message, array(), array("system"));
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:25,代码来源:class.ilShopUtils.php

示例6: buildUserId

 /**
  * @param $id
  * @param $type
  *
  * @return bool
  */
 private function buildUserId($id, $type)
 {
     global $ilDB;
     if ($type == 'ilias_login') {
         $user_id = ilObjUser::_lookupId($id);
         return $user_id ? $user_id : false;
     } elseif ($type == 'external_id') {
         $user_id = ilObjUser::_lookupObjIdByImportId($id);
         return $user_id ? $user_id : false;
     } elseif ($type == 'email') {
         $q = 'SELECT usr_id FROM usr_data WHERE email = ' . $ilDB->quote($id, 'text');
         $set = $ilDB->query($q);
         $user_id = $ilDB->fetchAssoc($set);
         return $user_id ? $user_id : false;
     } elseif ($type == 'user_id') {
         return $id;
     } else {
         return false;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilOrgUnitSimpleUserImport.php

示例7: checkInput

 /**
  * Check user's input
  */
 function checkInput($addr_id = 0)
 {
     // check if user login and e-mail-address are empty
     if (!strcmp(trim($_POST["login"]), "") && !strcmp(trim($_POST["email"]), "")) {
         ilUtil::sendInfo($this->lng->txt("mail_enter_login_or_email_addr"));
         $error = true;
     } else {
         if ($_POST["login"] != "" && !ilObjUser::_lookupId(ilUtil::stripSlashes($_POST["login"]))) {
             ilUtil::sendInfo($this->lng->txt("mail_enter_valid_login"));
             $error = true;
         } else {
             if ($_POST["email"] && !ilUtil::is_email($_POST["email"])) {
                 ilUtil::sendInfo($this->lng->txt("mail_enter_valid_email_addr"));
                 $error = true;
             }
         }
     }
     if (($this->existingEntry = $this->abook->checkEntryByLogin(ilUtil::stripSlashes($_POST["login"]))) > 0 && ($this->existingEntry != $addr_id && $addr_id > 0 || !$addr_id)) {
         ilUtil::sendInfo($this->lng->txt("mail_entry_exists"));
         $error = true;
     }
     return $error ? false : true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilMailAddressbookGUI.php

示例8: migrateAccount

 /**
  * migrate account
  *
  * @access public
  * 
  */
 public function migrateAccount()
 {
     global $lng, $ilClientIniFile, $ilLog, $rbacadmin;
     $lng->loadLanguageModule('auth');
     if (!isset($_POST['account_migration'])) {
         $this->showAccountMigration($lng->txt('err_choose_migration_type'));
         return false;
     }
     if ($_POST['account_migration'] == 1 and (!strlen($_POST['mig_username']) or !strlen($_POST['mig_password']))) {
         $this->showAccountMigration($lng->txt('err_wrong_login'));
         return false;
     }
     if ($_POST['account_migration'] == 1) {
         if (!($user_id = ilObjUser::_lookupId(ilUtil::stripSlashes($_POST['mig_username'])))) {
             $this->showAccountMigration($lng->txt('err_wrong_login'));
             return false;
         }
         $_POST['username'] = $_POST['mig_username'];
         $_POST['password'] = $_POST['mig_password'];
         include_once './Services/Authentication/classes/class.ilAuthFactory.php';
         include_once './Services/Database/classes/class.ilAuthContainerMDB2.php';
         $ilAuth = ilAuthFactory::factory(new ilAuthContainerMDB2());
         $ilAuth->start();
         if (!$ilAuth->checkAuth()) {
             $ilAuth->logout();
             $this->showAccountMigration($lng->txt('err_wrong_login'));
             return false;
         }
         $user = new ilObjUser($user_id);
         $user->setAuthMode(ilSession::get('tmp_auth_mode'));
         $user->setExternalAccount(ilSession::get('tmp_external_account'));
         $user->setActive(true);
         $user->update();
         // Assign to default role
         if (is_array(ilSession::get('tmp_roles'))) {
             foreach (ilSession::get('tmp_roles') as $role) {
                 $rbacadmin->assignUser((int) $role, $user->getId());
             }
         }
         // Log migration
         $ilLog->write(__METHOD__ . ': Migrated ' . ilSession::get('tmp_external_account') . ' to ILIAS account ' . $user->getLogin() . '.');
     } elseif ($_POST['account_migration'] == 2) {
         switch (ilSession::get('tmp_auth_mode')) {
             case 'apache':
                 $_POST['username'] = ilSession::get('tmp_external_account');
                 $_POST['password'] = ilSession::get('tmp_pass');
                 include_once 'Services/AuthApache/classes/class.ilAuthContainerApache.php';
                 $container = new ilAuthContainerApache();
                 $container->forceCreation(true);
                 $ilAuth = ilAuthFactory::factory($container);
                 $ilAuth->start();
                 break;
             case 'ldap':
                 $_POST['username'] = ilSession::get('tmp_external_account');
                 $_POST['password'] = ilSession::get('tmp_pass');
                 include_once 'Services/LDAP/classes/class.ilAuthContainerLDAP.php';
                 $container = new ilAuthContainerLDAP();
                 $container->forceCreation(true);
                 $ilAuth = ilAuthFactory::factory($container);
                 $ilAuth->start();
                 break;
             case 'radius':
                 $_POST['username'] = ilSession::get('tmp_external_account');
                 $_POST['password'] = ilSession::get('tmp_pass');
                 include_once './Services/Authentication/classes/class.ilAuthFactory.php';
                 include_once './Services/Radius/classes/class.ilAuthContainerRadius.php';
                 $container = new ilAuthContainerRadius();
                 $container->forceCreation(true);
                 $ilAuth = ilAuthFactory::factory($container);
                 $ilAuth->start();
                 break;
             case 'openid':
                 $_POST['username'] = ilSession::get('dummy');
                 $_POST['password'] = ilSession::get('dummy');
                 $_POST['oid_username'] = ilSession::get('tmp_oid_username');
                 $_POST['oid_provider'] = ilSession::get('tmp_oid_provider');
                 //ilSession::set('force_creation', true);
                 include_once './Services/Authentication/classes/class.ilAuthFactory.php';
                 include_once './Services/OpenId/classes/class.ilAuthContainerOpenId.php';
                 $container = new ilAuthContainerOpenId();
                 $container->forceCreation(true);
                 ilAuthFactory::setContext(ilAuthFactory::CONTEXT_OPENID);
                 include_once './Services/OpenId/classes/class.ilAuthOpenId.php';
                 $ilAuth = ilAuthFactory::factory($container);
                 // logout first to initiate a new login session
                 $ilAuth->logout();
                 ilSession::_destroy(session_id());
                 ilSession::set('force_creation', true);
                 $ilAuth->start();
         }
         // Redirect to acceptance
         ilUtil::redirect("ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&target=" . $_GET["target"] . "&cmd=getAcceptance");
     }
     // show personal desktop
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilStartUpGUI.php

示例9: save

 /**
  * save Record
  *
  * @param string $a_mode values: create | edit
  */
 public function save()
 {
     global $tpl, $ilUser, $lng, $ilCtrl;
     $this->initForm();
     if ($this->form->checkInput()) {
         $record_obj = ilDataCollectionCache::getRecordCache($this->record_id);
         $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
         $record_obj->setTableId($this->table_id);
         $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
         $record_obj->setLastEditBy($ilUser->getId());
         $create_mode = false;
         if (ilObjDataCollection::_hasWriteAccess($this->parent_obj->ref_id)) {
             $all_fields = $this->table->getRecordFields();
         } else {
             $all_fields = $this->table->getEditableFields();
         }
         $fail = "";
         //Check if we can create this record.
         foreach ($all_fields as $field) {
             try {
                 $value = $this->form->getInput("field_" . $field->getId());
                 $field->checkValidity($value, $this->record_id);
             } catch (ilDataCollectionInputException $e) {
                 $fail .= $field->getTitle() . ": " . $e . "<br>";
             }
         }
         if ($fail) {
             ilUtil::sendFailure($fail, true);
             $this->sendFailure();
             return;
         }
         if (!isset($this->record_id)) {
             if (!$this->table->hasPermissionToAddRecord($this->parent_obj->ref_id)) {
                 $this->accessDenied();
                 return;
             }
             $record_obj->setOwner($ilUser->getId());
             $record_obj->setCreateDate($date_obj->get(IL_CAL_DATETIME));
             $record_obj->setTableId($this->table_id);
             $record_obj->doCreate();
             $this->record_id = $record_obj->getId();
             $create_mode = true;
         } else {
             if (!$record_obj->hasPermissionToEdit($this->parent_obj->ref_id)) {
                 $this->accessDenied();
                 return;
             }
         }
         //edit values, they are valid we already checked them above
         foreach ($all_fields as $field) {
             $value = $this->form->getInput("field_" . $field->getId());
             //deletion flag on MOB inputs.
             if ($field->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_MOB && $this->form->getItemByPostVar("field_" . $field->getId())->getDeletionFlag()) {
                 $value = -1;
             }
             $record_obj->setRecordFieldValue($field->getId(), $value);
         }
         // Do we need to set a new owner for this record?
         if (!$create_mode) {
             $owner_id = ilObjUser::_lookupId($_POST['field_owner']);
             if (!$owner_id) {
                 ilUtil::sendFailure($lng->txt('user_not_known'));
                 $this->sendFailure();
                 return;
             }
             $record_obj->setOwner($owner_id);
         }
         if ($create_mode) {
             ilObjDataCollection::sendNotification("new_record", $this->table_id, $record_obj->getId());
         }
         $record_obj->doUpdate();
         ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
         $ilCtrl->setParameter($this, "table_id", $this->table_id);
         $ilCtrl->setParameter($this, "record_id", $this->record_id);
         $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
     } else {
         global $tpl;
         $this->form->setValuesByPost();
         $tpl->setContent($this->form->getHTML());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:86,代码来源:class.ilDataCollectionRecordEditGUI.php

示例10: addUserFromAutoComplete

 function addUserFromAutoComplete()
 {
     if (!strlen(trim($_POST['user_login']))) {
         ilUtil::sendFailure($this->lng->txt('msg_no_search_string'));
         $this->showSubmissions();
         return false;
     }
     $users = explode(',', $_POST['user_login']);
     $user_ids = array();
     foreach ($users as $user) {
         $user_id = ilObjUser::_lookupId($user);
         if (!$user_id) {
             ilUtil::sendFailure($this->lng->txt('user_not_known'));
             return $this->showSubmissions();
         }
         $user_ids[] = $user_id;
     }
     if (!$this->addParticipant($user_ids)) {
     }
     $this->showSubmissions();
     return false;
     return true;
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:23,代码来源:class.ilObjEphorusGUI.php

示例11: ilUserFeedWriter

} else {
    if ($_GET["user_id"] != "" && ilObjUser::_getFeedPass($_GET["user_id"]) != "" && (md5($_SERVER['PHP_AUTH_PW']) == ilObjUser::_getFeedPass($_GET["user_id"]) && $_SERVER['PHP_AUTH_USER'] == ilObjUser::_lookupLogin($_GET["user_id"])) && $feed_set->get("enable_private_feed")) {
        include_once "./Services/Feeds/classes/class.ilUserFeedWriter.php";
        // Third parameter is true for private feed
        $writer = new ilUserFeedWriter($_GET["user_id"], $_GET["hash"], true);
        $writer->showFeed();
    } else {
        if ($_GET["ref_id"] != "" && md5($_SERVER['PHP_AUTH_PW']) == ilObjUser::_getFeedPass(ilObjUser::_lookupId($_SERVER['PHP_AUTH_USER']))) {
            include_once "./Services/Feeds/classes/class.ilObjectFeedWriter.php";
            // Second parameter is optional to pass on to database-level to get news for logged-in users
            $writer = new ilObjectFeedWriter($_GET["ref_id"], ilObjUser::_lookupId($_SERVER['PHP_AUTH_USER']));
            $writer->showFeed();
        } else {
            // send appropriate header, if password is wrong, otherwise
            // there is no chance to re-enter it (unless, e.g. the browser is closed)
            if (md5($_SERVER['PHP_AUTH_PW']) != ilObjUser::_getFeedPass(ilObjUser::_lookupId($_SERVER['PHP_AUTH_USER']))) {
                Header("WWW-Authenticate: Basic realm=\"ILIAS Newsfeed\"");
                Header("HTTP/1.0 401 Unauthorized");
                exit;
            }
            include_once "./Services/Feeds/classes/class.ilFeedItem.php";
            include_once "./Services/Feeds/classes/class.ilFeedWriter.php";
            $blankFeedWriter = new ilFeedWriter();
            $feed_item = new ilFeedItem();
            $lng->loadLanguageModule("news");
            if ($ilSetting->get('short_inst_name') != "") {
                $blankFeedWriter->setChannelTitle($ilSetting->get('short_inst_name'));
            } else {
                $blankFeedWriter->setChannelTitle("ILIAS");
            }
            if (!$feed_set->get("enable_private_feed")) {
开发者ID:arlendotcn,项目名称:ilias,代码行数:31,代码来源:privfeed.php

示例12: handleLoginEvent

 /**
  * when current session is allowed to be created it marks it with
  * type regarding to the sessions user context.
  * when session is not allowed to be created it will be destroyed.
  */
 public static function handleLoginEvent($a_login, $a_auth)
 {
     global $ilSetting;
     require_once 'Services/User/classes/class.ilObjUser.php';
     $user_id = ilObjUser::_lookupId($a_login);
     // we need the session type for the session statistics
     // regardless of the current session handling type
     switch (true) {
         case isset($_ENV['SHELL']):
             $type = self::SESSION_TYPE_SYSTEM;
             break;
         case $user_id == ANONYMOUS_USER_ID:
             $type = self::SESSION_TYPE_ANONYM;
             break;
         case self::checkAdministrationPermission($user_id):
             $type = self::SESSION_TYPE_ADMIN;
             break;
         default:
             $type = self::SESSION_TYPE_USER;
             break;
     }
     $_SESSION['SessionType'] = $type;
     self::debug(__METHOD__ . " --> update sessions type to (" . $type . ")");
     // do not handle login event in fixed duration mode
     if ($ilSetting->get('session_handling_type', 0) != 1) {
         return;
     }
     if (in_array($type, self::$session_types_controlled)) {
         self::checkCurrentSessionIsAllowed($a_auth, $user_id);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilSessionControl.php

示例13: byLogin

 /**
  *
  */
 public function byLogin()
 {
     $this->inviteById(ilObjUser::_lookupId($_REQUEST['users']));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:7,代码来源:class.ilChatroomInviteUsersToPrivateRoomTask.php

示例14: getUserIdByLogin

 function getUserIdByLogin($a_login)
 {
     return (int) ilObjUser::_lookupId($a_login);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:4,代码来源:class.ilObjUser.php

示例15: addUserFromAutoComplete

 /**
  * Autocomplete submit
  */
 public function addUserFromAutoComplete()
 {
     global $lng;
     if (!strlen(trim($_POST['user_login']))) {
         ilUtil::sendFailure($lng->txt('msg_no_search_string'));
         return $this->contributors();
     }
     $users = explode(',', $_POST['user_login']);
     $user_ids = array();
     foreach ($users as $user) {
         $user_id = ilObjUser::_lookupId($user);
         if (!$user_id) {
             ilUtil::sendFailure($lng->txt('user_not_known'));
             return $this->contributors();
         }
         $user_ids[] = $user_id;
     }
     return $this->addContributor($user_ids);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:22,代码来源:class.ilObjBlogGUI.php


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