mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-21 23:06:16 +00:00
Add configmapper::getKey to get user settings
This commit is contained in:
parent
3d8c834a43
commit
74ed1e7527
@ -54,6 +54,19 @@ class ConfigMapper extends Mapper {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getKey($key) {
|
||||||
|
try {
|
||||||
|
$sql = "SELECT key FROM `*PREFIX*ocsms_config` WHERE `key` = ? AND `user` = ?";
|
||||||
|
$result = $this->findEntity($sql, array($key, $this->user));
|
||||||
|
foreach ($result as $r) {
|
||||||
|
return $this->crypto->decrypt($r->getValue());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} catch (DoesNotExistException $e){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user