* fixed viewing thread without being logged

* removed unused and wrong function OTS_Account::getLastLogin() (field
lastday is used for premium)
This commit is contained in:
slawkens1 2017-10-20 20:29:10 +02:00
parent 8ab7be9fb8
commit c6b6638705
2 changed files with 1 additions and 11 deletions

View File

@ -341,16 +341,6 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
//return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));
}
public function getLastLogin()
{
if( !isset($this->data['lastday']) )
{
throw new E_OTS_NotLoaded();
}
return $this->data['lastday'];
}
public function isPremium()
{
global $config;

View File

@ -21,7 +21,7 @@ if(empty($thread_name['name'])) {
return;
}
if(Forum::hasAccess($thread_name['section'])) {
if(!Forum::hasAccess($thread_name['section'])) {
echo "You don't have access to view this thread.";
return;
}