forked from marcinwol/zfopenid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Login action, profileLink and indexAction in IndexController refactored.
- Loading branch information
marcin
committed
Feb 23, 2011
1 parent
8120d8a
commit 15c8760
Showing
8 changed files
with
110 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
<?php | ||
|
||
class IndexController extends Zend_Controller_Action | ||
{ | ||
class IndexController extends Zend_Controller_Action { | ||
|
||
public function init() | ||
{ | ||
public function init() { | ||
/* Initialize action controller here */ | ||
} | ||
|
||
public function indexAction() | ||
{ | ||
// action body | ||
} | ||
public function indexAction() { | ||
|
||
$auth = Zend_Auth::getInstance(); | ||
|
||
if ($auth->hasIdentity()) { | ||
$this->view->identity = $auth->getIdentity(); | ||
} else { | ||
$this->view->identity = null; | ||
} | ||
|
||
|
||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
<div> | ||
|
||
<?php echo $this->profileLink();?> | ||
<?php if ($this->identity): ?> | ||
|
||
<h2>You are logged</h2> | ||
You identity: | ||
<pre> | ||
<?php echo $this->identity['identity']; ?> | ||
</pre> | ||
<?php if (isset($this->identity['properties'])): ?> | ||
Data fetched: | ||
<pre> | ||
<?php echo var_export($this->identity['properties'], true); ?> | ||
</pre> | ||
<?php endif; ?> | ||
|
||
<?php else: ?> | ||
<h2>You are not logged</h2> | ||
<?php endif; ?> | ||
|
||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters