@@ -23,7 +23,7 @@ |
||
23 | 23 | $this->get("user-registration/"); |
24 | 24 | |
25 | 25 | $this->submitForm("SignUpForm", "action_doSubmit", array("FirstName" => "John", |
26 | - "Password[_Password]" => "admin", |
|
26 | + "Password[_Password]" => "admin", |
|
27 | 27 | "Password[_ConfirmPassword]" => "admin", "Email" => "[email protected]")); |
28 | 28 | |
29 | 29 | $this->assertEquals( |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | $this->assertEquals( |
30 | 30 | 1, |
31 | - Member::get()->filter("Email", "[email protected]")->count()>0 ? 1 : 0, |
|
31 | + Member::get()->filter("Email", "[email protected]")->count() > 0 ? 1 : 0, |
|
32 | 32 | 'testMyForm() returns the user email' |
33 | 33 | ); |
34 | 34 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $member = Member::get()->filter("Email", "[email protected]")->first(); |
24 | 24 | Injector::inst()->get(IdentityStore::class)->logIn($member); |
25 | - $page = $this->get("my-profile/"); // attempt to access the profile Page |
|
25 | + $page = $this->get("my-profile/"); // attempt to access the profile Page |
|
26 | 26 | $this->assertEquals(200, $page->getStatusCode(), "a page should load"); |
27 | 27 | } |
28 | 28 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $this->assertEquals( |
42 | 42 | 1, |
43 | - Member::get()->filter("Email", "[email protected]")->count()>0 ? 1 : 0, |
|
43 | + Member::get()->filter("Email", "[email protected]")->count() > 0 ? 1 : 0, |
|
44 | 44 | 'testMyForm() returns the email from profile page.' |
45 | 45 | ); |
46 | 46 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function testfindlink() |
19 | 19 | { |
20 | - $page = $this->get("user-registration/"); // attempt to access the signup Page |
|
20 | + $page = $this->get("user-registration/"); // attempt to access the signup Page |
|
21 | 21 | $this->assertEquals(200, $page->getStatusCode(), "a page should load"); |
22 | 22 | } |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function testfindlink() |
19 | 19 | { |
20 | - $page = $this->get("user-login/"); // attempt to access the user login Page |
|
20 | + $page = $this->get("user-login/"); // attempt to access the user login Page |
|
21 | 21 | $this->assertEquals(200, $page->getStatusCode(), "a page should load"); |
22 | 22 | } |
23 | 23 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | if (Security::getCurrentUser()) { |
27 | 27 | $html = DBHTMLText::create(); |
28 | - $html->setValue("<a href='" . Security::logout_url() . "&BackURL=/'>Logout</a>"); |
|
28 | + $html->setValue("<a href='".Security::logout_url()."&BackURL=/'>Logout</a>"); |
|
29 | 29 | return $html; |
30 | 30 | } |
31 | 31 | return false; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'Root.UserManagement', |
43 | 43 | TreeDropdownField::create( |
44 | 44 | 'CustomerGroupID', |
45 | - _t(__CLASS__ . '.CustomerGroup', 'Group to add new customers to'), |
|
45 | + _t(__CLASS__.'.CustomerGroup', 'Group to add new customers to'), |
|
46 | 46 | Group::class |
47 | 47 | ) |
48 | 48 | ); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'Root.UserManagement', |
51 | 51 | TreeDropdownField::create( |
52 | 52 | 'LoginUrlID', |
53 | - _t(__CLASS__ . '.LoginUrl', 'Login Url'), |
|
53 | + _t(__CLASS__.'.LoginUrl', 'Login Url'), |
|
54 | 54 | SiteTree::class |
55 | 55 | ) |
56 | 56 | ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'Root.UserManagement', |
59 | 59 | TreeDropdownField::create( |
60 | 60 | 'LoginCallBackUrlID', |
61 | - _t(__CLASS__ . '.LoginCallBackUrl', 'Login Call Back Url'), |
|
61 | + _t(__CLASS__.'.LoginCallBackUrl', 'Login Call Back Url'), |
|
62 | 62 | SiteTree::class |
63 | 63 | ) |
64 | 64 | ); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | 'Root.UserManagement', |
67 | 67 | TreeDropdownField::create( |
68 | 68 | 'LostPasswordUrlID', |
69 | - _t(__CLASS__ . '.LostPasswordUrl', 'Lost Password Url'), |
|
69 | + _t(__CLASS__.'.LostPasswordUrl', 'Lost Password Url'), |
|
70 | 70 | SiteTree::class |
71 | 71 | ) |
72 | 72 | ); |
@@ -74,21 +74,21 @@ discard block |
||
74 | 74 | 'Root.UserManagement', |
75 | 75 | TextareaField::create( |
76 | 76 | 'ProfileUpdateSuccess', |
77 | - _t(__CLASS__ . '.ProfileUpdateSuccess', 'Profile update Success Message') |
|
77 | + _t(__CLASS__.'.ProfileUpdateSuccess', 'Profile update Success Message') |
|
78 | 78 | ) |
79 | 79 | ); |
80 | 80 | $fields->addFieldToTab( |
81 | 81 | 'Root.UserManagement', |
82 | 82 | TextareaField::create( |
83 | 83 | 'ProfileUpdatError', |
84 | - _t(__CLASS__ . '.ProfileUpdatError', 'Profile update Error Message') |
|
84 | + _t(__CLASS__.'.ProfileUpdatError', 'Profile update Error Message') |
|
85 | 85 | ) |
86 | 86 | ); |
87 | 87 | $fields->addFieldToTab( |
88 | 88 | 'Root.UserManagement', |
89 | 89 | CheckboxField::create( |
90 | 90 | 'EnableSpamProtection', |
91 | - _t(__CLASS__ . '.EnableSpamProtection', 'Enable Spam Protection') |
|
91 | + _t(__CLASS__.'.EnableSpamProtection', 'Enable Spam Protection') |
|
92 | 92 | ) |
93 | 93 | ); |
94 | 94 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function getExportFieldNames() |
166 | 166 | { |
167 | 167 | $memberFields = Member::create()->getFrontEndFields()->dataFieldNames(); |
168 | - $memberFields = array_diff($memberFields, ["FirstName", "Surname", "Email", "TempIDHash", "TempIDExpired", "AutoLoginHash", "AutoLoginExpired","PasswordEncryption","Salt","Locale", "FailedLoginCount", "LockedOutUntil", "Password", "PasswordExpiry"]); |
|
168 | + $memberFields = array_diff($memberFields, ["FirstName", "Surname", "Email", "TempIDHash", "TempIDExpired", "AutoLoginHash", "AutoLoginExpired", "PasswordEncryption", "Salt", "Locale", "FailedLoginCount", "LockedOutUntil", "Password", "PasswordExpiry"]); |
|
169 | 169 | return array_combine($memberFields, $memberFields); |
170 | 170 | } |
171 | 171 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | if (!$allGroups->count()) { |
21 | 21 | $authorGroup = new Group(); |
22 | 22 | $authorGroup->Code = 'general'; |
23 | - $authorGroup->Title = _t(__CLASS__ . '.DefaultGroupTitleGeneral', 'General'); |
|
23 | + $authorGroup->Title = _t(__CLASS__.'.DefaultGroupTitleGeneral', 'General'); |
|
24 | 24 | $authorGroup->Sort = 1; |
25 | 25 | $authorGroup->write(); |
26 | 26 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | if ($page = DataObject::get_one(self::class)) { |
43 | 43 | return $page; |
44 | 44 | } |
45 | - user_error(_t(__CLASS__ . '.NoPage', 'No UserProfilePage was found. |
|
45 | + user_error(_t(__CLASS__.'.NoPage', 'No UserProfilePage was found. |
|
46 | 46 | Please create one in the CMS!'), E_USER_ERROR); |
47 | 47 | return null; |
48 | 48 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | public function ProfileForm() |
39 | 39 | { |
40 | - $form = new ProfileForm($this, 'ProfileForm'); |
|
40 | + $form = new ProfileForm($this, 'ProfileForm'); |
|
41 | 41 | if ($this->member) { |
42 | 42 | $form->loadDataFrom($this->member); |
43 | 43 | } |