From: Marcel Werk Date: Fri, 23 Nov 2012 16:57:22 +0000 (+0100) Subject: Added missing permission validation X-Git-Tag: 2.0.0_Beta_1~758 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1e2e6d83eed4e9b77faf6673950c40450925a25;p=GitHub%2FWoltLab%2FWCF.git Added missing permission validation --- diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index 76bb555704..0a51b307a4 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -368,4 +368,13 @@ final class User extends DatabaseObject implements IRouteController { return $language; } + + /** + * Returns true, if the active user can edit this user. + * + * @return boolean + */ + public function canEdit() { + return (WCF::getSession()->getPermission('admin.user.canEditUser') && UserGroup::isAccessibleGroup($this->getGroupIDs())); + } }