openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 521e6e36e236832a499ad6046fb7306752ce0bda
parent d572b2fdb7d1a8840b5cd3a42cd2df9fa29e15d6
Author: Jan Dankert <devnull@localhost>
Date:   Mon,  5 Nov 2012 23:03:42 +0100

Aus der Benutzerliste heraus den Benutzer wechseln.

Diffstat:
action/UserAction.class.php | 17++++++++++++++++-
themes/default/templates/userlist/show.tpl.src.xml | 4++--
2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/action/UserAction.class.php b/action/UserAction.class.php @@ -415,6 +415,21 @@ class UserAction extends Action return true; } - + + + /** + * Wechselt zu einem ausgewählten User. + */ + public function switchPost() + { + // User laden... + $user = new User( $this->getRequestId() ); + $user->load(); + + // Und in der Sitzung speichern. + Session::setUser( $user ); + + $this->refresh(); + } } \ No newline at end of file diff --git a/themes/default/templates/userlist/show.tpl.src.xml b/themes/default/templates/userlist/show.tpl.src.xml @@ -27,8 +27,8 @@ <text raw=")"></text> </if> </column> - <column> - <link target="_top" action="index" subaction="switchuser" id="var:userid"> + <column class="clickable"> + <link type="post" action="user" subaction="switch" id="var:userid"> <text key="LOGIN"></text> </link> </column>