1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 17:24:46 +02:00

A couple of other minor updates to Session and FieldtypeModule

This commit is contained in:
Ryan Cramer
2018-08-03 12:21:00 -04:00
parent 95adb8039c
commit f61bca5d9f
2 changed files with 10 additions and 4 deletions

View File

@@ -906,8 +906,9 @@ class Session extends Wire implements \IteratorAggregate {
if(!$user || !$user instanceof User) {
$name = $this->wire('sanitizer')->pageNameUTF8($name);
$user = $this->wire('users')->get("name=" . $this->wire('sanitizer')->selectorValue($name));
if(!$user || !$user->id) return false;
}
if(!$user || !$user->id || !$user instanceof User) return false;
if($user->isGuest()) return false;
$xroles = $this->wire('config')->loginDisabledRoles;
if(!is_array($xroles) && !empty($xroles)) $xroles = array($xroles);
if($name) {}