Bug Fixes

-fix for getSkillTries as reported by whiteblXK
-fix for login and account type as reported by vG-
This commit is contained in:
Lee
2018-12-30 01:00:26 +00:00
parent 8c83eb805b
commit 1859867039
5 changed files with 72 additions and 29 deletions

View File

@@ -432,6 +432,11 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
$this->data['lastday'] = (int) $lastlogin;
}
public function setWebFlags($webflags)
{
$this->data['web_flags'] = (int) $webflags;
}
/**
* Name.
*
@@ -882,6 +887,32 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
return 0;
}
public function getAccGroupId()
{
if(isset($this->data['group_id'])) {
return $this->data['group_id'];
}
global $db;
if($db->hasColumn('accounts', 'group_id')) {
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
// if anything was found
if(isset($query['group_id'])) {
$this->data['group_id'] = $query['group_id'];
return $query['group_id'];
}
}
if($db->hasColumn('accounts', 'type')) {
$query = $this->db->query('SELECT `type` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
// if anything was found
if(isset($query['type'])) {
$this->data['type'] = $query['type'];
return $query['type'];
}
}
return 0;
}
/**
/**
* Checks highest access level of account in given guild.
*