- PHP Framework upgrade 3.5.0 -> 3.5.1 (fixes some issues with CREST cURL caching, and SESSION management)

- #138 added "cookie logout" to "logout" menu entry
This commit is contained in:
Exodus4D
2016-05-06 18:09:28 +02:00
parent eb1e365020
commit dfd1e8501d
28 changed files with 575 additions and 388 deletions

View File

@@ -94,7 +94,7 @@ class CharacterModel extends BasicModel {
'characterMaps' => [
'has-many' => ['Model\CharacterMapModel', 'characterId']
],
'characterTokens' => [
'characterAuthentications' => [
'has-many' => ['Model\CharacterAuthenticationModel', 'characterId']
]
];
@@ -538,4 +538,15 @@ class CharacterModel extends BasicModel {
return $maps;
}
public function logout(){
if($this->characterAuthentications){
foreach($this->characterAuthentications as $characterAuthentication){
/**
* @var $characterAuthentication CharacterAuthenticationModel
*/
$characterAuthentication->erase();
}
}
}
}