Displays the login page
180295
public function actionImage()
	{
		$this->pageTitle = Yii::t('phrase', 'Image Template | Dora. - Coming Soon Page Template');
		$this->pageDescription = '';
		$this->pageMeta = '';
		$this->render('/dora/template/front_image');
	}
641750
public function display() {
        global $OUTPUT;
        groups_print_activity_menu($this->feedbackstructure->get_cm(), $this->baseurl->out());
        $grandtotal = $this->get_total_responses_count();
        if (!$grandtotal) {
            echo $OUTPUT->box(get_string('nothingtodisplay'), 'generalbox nothingtodisplay');
            return;
        }

        if (count($this->feedbackstructure->get_items(true)) > self::PREVIEWCOLUMNSLIMIT) {
            echo $OUTPUT->notification(get_string('questionslimited', 'feedback', self::PREVIEWCOLUMNSLIMIT), 'info');
        }

        $this->out($this->showall ? $grandtotal : FEEDBACK_DEFAULT_PAGE_COUNT,
                $grandtotal > FEEDBACK_DEFAULT_PAGE_COUNT);

        // Toggle 'Show all' link.
        if ($this->totalrows > FEEDBACK_DEFAULT_PAGE_COUNT) {
            if (!$this->use_pages) {
                echo html_writer::div(html_writer::link(new moodle_url($this->baseurl, [$this->showallparamname => 0]),
                        get_string('showperpage', '', FEEDBACK_DEFAULT_PAGE_COUNT)), 'showall');
            } else {
                echo html_writer::div(html_writer::link(new moodle_url($this->baseurl, [$this->showallparamname => 1]),
                        get_string('showall', '', $this->totalrows)), 'showall');
            }
        }
    }
804115
function doLogin() {
	// Request the login page.
	let res = http.get(baseURL + "/user/login");
	check(res, {
		"title is correct": (res) => res.html("title").text() == "User account | David li commerce-test",
	});

	// TODO: Add attr() to k6/html!
	// Extract hidden input fields.
	let formBuildID = res.body.match('name="form_build_id" value="(.*)"')[1];

	group("login", function() {
		// Pick a random set of credentials.
		let creds = credentials[Math.floor(Math.random()*credentials.length)];

		// Create login request.
		let formdata = {
			name: creds.username,
			pass: creds.password,
			form_build_id: formBuildID,
			form_id: "user_login",
			op: "Log in",
		};
		let headers = { "Content-Type": "application/x-www-form-urlencoded" };
		// Send login request
		let res = http.post(baseURL + "/user/login", formdata, { headers: headers });
		// Verify that we ended up on the user page
		check(res, {
			"login succeeded": (res) => res.url == `${baseURL}/users/${creds.username}`,
		}) || fail("login failed");
	});
}
23090
public function loginpageAction()
    {
        $view = $this->forward()->dispatch('MelisCore\Controller\PluginView',
            [
                'action' => 'generate',
                'appconfigpath' => '/meliscore_login',
                'keyview' => 'meliscore_login',
            ]);

        $background = '';
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('/meliscore_login');
        if (!empty($appConfigForm['datas']['login_background'])) {
            $background = $appConfigForm['datas']['login_background'];
        }

        $schemeSvc = $this->getServiceLocator()->get('MelisCorePlatformSchemeService');
        $schemeData = $schemeSvc->getCurrentScheme();

        $bundleAsset = $this->getServiceLocator()->get('MelisAssetManagerWebPack')->getAssets();


        $this->layout()->addChild($view, 'content');

        $this->layout()->isLogin = 1;
        $this->layout()->login_background = $background;
        $this->layout()->schemes = $schemeData;
        $this->layout()->bundle = $bundleAsset;

        return $view;

    }
858920
public function print_login() {
        if ($this->options['ajax']) {
            $ret = array();
            $fulltext = new stdClass();
            $fulltext->label = get_string('fulltext', 'repository_flickr_public').': ';
            $fulltext->id    = 'el_fulltext';
            $fulltext->type = 'text';
            $fulltext->name = 'flickr_fulltext';

            $tag = new stdClass();
            $tag->label = get_string('tag', 'repository_flickr_public').': ';
            $tag->id    = 'el_tag';
            $tag->type = 'text';
            $tag->name = 'flickr_tag';

            $email_field = new stdClass();
            $email_field->label = get_string('username', 'repository_flickr_public').': ';
            $email_field->id    = 'account';
            $email_field->type = 'text';
            $email_field->name = 'flickr_account';

            $commercial = new stdClass();
            $commercial->label = get_string('commercialuse', 'repository_flickr_public').': ';
            $commercial->id    = 'flickr_commercial_id';
            $commercial->type  = 'checkbox';
            $commercial->name  = 'flickr_commercial';
            $commercial->value = 'yes';

            $modification = new stdClass();
            $modification->label = get_string('modification', 'repository_flickr_public').': ';
            $modification->id    = 'flickr_modification_id';
            $modification->type  = 'checkbox';
            $modification->name  = 'flickr_modification';
            $modification->value = 'yes';

            $ret['login'] = array($fulltext, $tag, $email_field, $commercial, $modification);
            $ret['login_btn_label'] = get_string('search');
            $ret['login_btn_action'] = 'search';
            return $ret;
        } else {
            echo '<table>';
            echo '<tr><td><label>'.get_string('fulltext', 'repository_flickr_public').'</label></td>';
            echo '<td><input type="text" name="flickr_fulltext" /></td></tr>';
            echo '<tr><td><label>'.get_string('tag', 'repository_flickr_public').'</label></td>';
            echo '<td><input type="text" name="flickr_tag" /></td></tr>';
            echo '<tr><td><label>'.get_string('username', 'repository_flickr_public').'</label></td>';
            echo '<td><input type="text" name="flickr_account" /></td></tr>';

            echo '<tr><td><label>'.get_string('commercialuse', 'repository_flickr_public').'</label></td>';
            echo '<td>';
            echo '<input type="checkbox" name="flickr_commercial" value="yes" />';
            echo '</td></tr>';

            echo '<tr><td><label>'.get_string('modification', 'repository_flickr_public').'</label></td>';
            echo '<td>';
            echo '<input type="checkbox" name="flickr_modification" value="yes" />';
            echo '</td></tr>';

            echo '</table>';

            echo '<input type="hidden" name="action" value="search" />';
            echo '<input type="submit" value="'.get_string('search', 'repository').'" />';
        }
    }
284740
def show_view(self):
        
        self.current.output['login_process'] = True
        if self.current.is_auth:
            self._do_upgrade()
        else:
            self.current.output['forms'] = LoginForm(current=self.current).serialize()
95574
def show_page(self):
        
        username = self.user_manager.session_username()
        user_info = self.database.users.find_one({"username": username})
        all_courses = self.course_factory.get_all_courses()

        # Display
        open_courses = {courseid: course for courseid, course in all_courses.items() if course.is_open_to_non_staff()}
        open_courses = OrderedDict(sorted(iter(open_courses.items()), key=lambda x: x[1].get_name(self.user_manager.session_language())))

        return self.template_helper.get_renderer().index(open_courses, user_info)
290997
public function print_login() {
        $client = $this->get_user_oauth_client();
        $loginurl = $client->get_login_url();
        if ($this->options['ajax']) {
            $ret = array();
            $btn = new \stdClass();
            $btn->type = 'popup';
            $btn->url = $loginurl->out(false);
            $ret['login'] = array($btn);
            return $ret;
        } else {
            echo html_writer::link($loginurl, get_string('login', 'repository'),
                    array('target' => '_blank',  'rel' => 'noopener noreferrer'));
        }
    }
635956
function check_loginout()
	{
		switch (arg('action'))
		{
			case 'login':
				$this->login(arg('user'), $this->password_hash(arg('password')), arg('autologin', 'int'));
				HTTP::redirect($this->request['url']);
			break;
			case 'logout':
				$this->logout(true);
				HTTP::redirect($this->root.'admin/');
			break;
		}
	}
649611
public function display() {
		
		$view = $this->getView();

		if (is_subclass_of($view, 'Pair\View')) {
			$view->display();
		} else {
			if (!$this->router->isRaw()) {
				$this->enqueueError($this->translator->get('RESOURCE_NOT_FOUND', $this->router->module . '/' . $this->router->action));
			}
			$this->redirect($this->router->module);
		}
		
	}
930230
def login_view(self):
        """"""

        # Authenticate username/email and login authenticated users.

        safe_next_url = self._get_safe_next_url('next', self.USER_AFTER_LOGIN_ENDPOINT)
        safe_reg_next = self._get_safe_next_url('reg_next', self.USER_AFTER_REGISTER_ENDPOINT)

        # Immediately redirect already logged in users
        if self.call_or_get(current_user.is_authenticated) and self.USER_AUTO_LOGIN_AT_LOGIN:
            return redirect(safe_next_url)

        # Initialize form
        login_form = self.LoginFormClass(request.form)  # for login.html
        register_form = self.RegisterFormClass()  # for login_or_register.html
        if request.method != 'POST':
            login_form.next.data = register_form.next.data = safe_next_url
            login_form.reg_next.data = register_form.reg_next.data = safe_reg_next

        # Process valid POST
        if request.method == 'POST' and login_form.validate():
            # Retrieve User
            user = None
            user_email = None
            if self.USER_ENABLE_USERNAME:
                # Find user record by username
                user = self.db_manager.find_user_by_username(login_form.username.data)

                # Find user record by email (with form.username)
                if not user and self.USER_ENABLE_EMAIL:
                    user, user_email = self.db_manager.get_user_and_user_email_by_email(login_form.username.data)
            else:
                # Find user by email (with form.email)
                user, user_email = self.db_manager.get_user_and_user_email_by_email(login_form.email.data)

            if user:
                # Log user in
                safe_next_url = self.make_safe_url(login_form.next.data)
                return self._do_login_user(user, safe_next_url, login_form.remember_me.data)

        # Render form
        self.prepare_domain_translations()
        template_filename = self.USER_LOGIN_AUTH0_TEMPLATE if self.USER_ENABLE_AUTH0 else self.USER_LOGIN_TEMPLATE
        return render_template(template_filename,
                      form=login_form,
                      login_form=login_form,
                      register_form=register_form)
472971
public function print_entries() {
        global $CFG, $USER, $DB, $OUTPUT, $PAGE;
        $sitecontext = context_system::instance();

        // Blog renderer.
        $output = $PAGE->get_renderer('blog');

        $page  = optional_param('blogpage', 0, PARAM_INT);
        $limit = optional_param('limit', get_user_preferences('blogpagesize', 10), PARAM_INT);
        $start = $page * $limit;

        $morelink = '<br />&nbsp;&nbsp;';

        $entries = $this->get_entries($start, $limit);
        $totalentries = $this->count_entries();
        $pagingbar = new paging_bar($totalentries, $page, $limit, $this->get_baseurl());
        $pagingbar->pagevar = 'blogpage';
        $blogheaders = blog_get_headers();

        echo $OUTPUT->render($pagingbar);

        if (has_capability('moodle/blog:create', $sitecontext)) {
            // The user's blog is enabled and they are viewing their own blog.
            $userid = optional_param('userid', null, PARAM_INT);

            if (empty($userid) || (!empty($userid) && $userid == $USER->id)) {

                $courseid = optional_param('courseid', null, PARAM_INT);
                $modid = optional_param('modid', null, PARAM_INT);

                $addurl = new moodle_url("$CFG->wwwroot/blog/edit.php");
                $urlparams = array('action' => 'add',
                                   'userid' => $userid,
                                   'courseid' => $courseid,
                                   'groupid' => optional_param('groupid', null, PARAM_INT),
                                   'modid' => $modid,
                                   'tagid' => optional_param('tagid', null, PARAM_INT),
                                   'tag' => optional_param('tag', null, PARAM_INT),
                                   'search' => optional_param('search', null, PARAM_INT));

                $urlparams = array_filter($urlparams);
                $addurl->params($urlparams);

                $addlink = '<div class="addbloglink">';
                $addlink .= '<a href="'.$addurl->out().'">'. $blogheaders['stradd'].'</a>';
                $addlink .= '</div>';
                echo $addlink;
            }
        }

        if ($entries) {
            $count = 0;
            foreach ($entries as $entry) {
                $blogentry = new blog_entry(null, $entry);

                // Get the required blog entry data to render it.
                $blogentry->prepare_render();
                echo $output->render($blogentry);

                $count++;
            }

            echo $OUTPUT->render($pagingbar);

            if (!$count) {
                print '<br /><div style="text-align:center">'. get_string('noentriesyet', 'blog') .'</div><br />';
            }

            print $morelink.'<br />'."\n";
            return;
        }
    }
797238
public function processLogin()
    {
        $this->memorizeURL();
        $this->app->template->tryDel('Menu');
        $this->showLoginForm();

        $this->app->hook('post-init');
        $this->app->hook('pre-exec');

        if (isset($_GET['submit']) && $_POST) {
            $this->app->hook('submitted');
        }

        $this->app->hook('post-submit');
        $this->app->execute();
        exit;
    }
661879
public function print_login() {
        $url = $this->dropbox->get_login_url();
        if ($this->options['ajax']) {
            $ret = array();
            $btn = new \stdClass();
            $btn->type = 'popup';
            $btn->url = $url->out(false);
            $ret['login'] = array($btn);
            return $ret;
        } else {
            echo html_writer::link($url, get_string('login', 'repository'), array('target' => '_blank'));
        }
    }
12500
public function display()
    {
        $options = $this->getOptions();

        if (!$this->visible || $options === null) {
            return;
        }

        SwatWidget::display();

        // add a hidden field so we can check if this list was submitted on
        // the process step
        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        if ($this->show_blank) {
            $options = array_merge(
                array(new SwatOption(null, $this->blank_title)),
                $options
            );
        }

        $table_tag = new SwatHtmlTag('table');
        $table_tag->id = $this->id;
        $table_tag->class = $this->getCSSClassString();
        $table_tag->open();

        foreach ($options as $index => $option) {
            $this->displayRadioTableOption($option, $index);
        }

        $table_tag->close();
    }
465043
@Path("/users/{user.login}")
	@Get
	public void show(User user) {
	    result.include("user", userDao.find(user.getLogin()));

	    //You can redirect to any page if you like.
	    result.forwardTo("/WEB-INF/jsp/users/view.jsp");
	    
	}
842052
public function display()
    {
        \http_response_code($this->getResponseCode());
        if ($this->contentType) {
            header('Content-Type: ' . $this->contentType);
        }
        //        header('Content-Length: ' . strlen($this->content));
        if ($this->redirection) {
            header('Location: ' . $this->redirection);
        }
        Events::dispatch('beforeResponseSend', array($this));
        session_write_close();
        print $this->content;
        Profiler::dump();
        Events::dispatch('afterResponseSend', array($this));
    }