File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class login implements renderable, templatable {
7878 * @param string $username The username to display.
7979 */
8080 public function __construct (array $ authsequence , $ username = '' ) {
81- global $ CFG , $ SESSION ;
81+ global $ CFG ;
8282
8383 $ this ->username = $ username ;
8484
@@ -88,7 +88,7 @@ public function __construct(array $authsequence, $username = '') {
8888 $ this ->cookieshelpicon = new help_icon ('cookiesenabled ' , 'core ' );
8989
9090 $ this ->autofocusform = !empty ($ CFG ->loginpageautofocus );
91- $ this ->rememberusername = isset ($ CFG ->rememberusername ) and $ CFG ->rememberusername == 2 ;
91+ $ this ->rememberusername = isset ($ CFG ->rememberusername ) && $ CFG ->rememberusername != 0 ;
9292
9393 $ this ->forgotpasswordurl = new moodle_url ('/login/forgot_password.php ' );
9494 $ this ->loginurl = new moodle_url ('/login/index.php ' );
Original file line number Diff line number Diff line change @@ -39,3 +39,18 @@ Feature: Authentication
3939 Given I log in as "admin"
4040 When I log out
4141 Then I should see "You are not logged in" in the "page-footer" "region"
42+
43+ Scenario Outline : Checking the display of the Remember username checkbox
44+ Given I log in as "admin"
45+ And I set the following administration settings values:
46+ | rememberusername | <settingvalue > |
47+ And I log out
48+ And I am on homepage
49+ When I click on "Log in" "link" in the ".logininfo" "css_element"
50+ Then I should <expect> "Remember username"
51+
52+ Examples :
53+ | settingvalue | expect |
54+ | 0 | not see |
55+ | 1 | see |
56+ | 2 | see |
You can’t perform that action at this time.
0 commit comments