Created
August 27, 2015 16:11
-
-
Save cebe/a23558718f6bdfec67df to your computer and use it in GitHub Desktop.
Yii 1.1 login as someone else
This file contains hidden or 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
public function actionSuto() | |
{ | |
$identity = UserIdentity::unauthenticatedById($_GET['id']); | |
if ($identity) { | |
Yii::app()->user->login($identity, 0); | |
} | |
$this->redirect(array('/site/index')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment