src/EntityDescriptor/User/AbstractUser.php
public static function loggedCanDo($action, AbstractUser $object=null) {
		global $USER;
		return !empty($USER) && $USER->canDo($action, $object);
	}
public static function loggedCanDo($action, AbstractUser $object=null) {
		global $USER;
		return !empty($USER) && $USER->canDo($action, $object);
	}
public static function loggedCanDo ( $ action , AbstractUser $ object = null ) { global $ USER ; return ! empty ( $ USER ) && $ USER -> canDo ( $ action , $ object ) ; }
Check if this user can do a restricted action

@param string $action The action to look for
@param AbstractUser $object The object to edit if editing one or null. Default value is null
@return boolean True if this user can do this $action
Check if this user can do a restricted action