1 <?php
2 3 4 5 6 7
8 class AuthFormWidget extends SidebarWidget {
9
10 function MemberLoginForm() {
11 $controller = new Page_controller();
12 $form = new MemberLoginForm($controller, 'LoginForm');
13 $link = '';
14 if (Member::currentUserID() && class_exists('ProfilePage')) {
15 if (ProfilePage::find_link()) {
16 $link = ProfilePage::find_link();
17 }
18 }
19 return new ArrayData(array(
20 'Form' => $form,
21 'ProfileLink' => $link,
22 ));
23 }
24
25 function hasContent() {
26 return true;
27 }
28
29 function IsLogged(){
30 return (Member::currentUserID()) ? true : false;
31 }
32 }
33
34
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-