src/Security/Member.php
public function canView($member = null)
    {
        //get member
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        //check for extensions, we do this first as they can overrule everything
        $extended = $this->extendedCan(__FUNCTION__, $member);
        if ($extended !== null) {
            return $extended;
        }

        //need to be logged in and/or most checks below rely on $member being a Member
        if (!$member) {
            return false;
        }
        // members can usually view their own record
        if ($this->ID == $member->ID) {
            return true;
        }

        //standard check
        return Permission::checkMember($member, 'CMS_ACCESS_SecurityAdmin');
    }
public function canView($member = null)
    {
        //get member
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        //check for extensions, we do this first as they can overrule everything
        $extended = $this->extendedCan(__FUNCTION__, $member);
        if ($extended !== null) {
            return $extended;
        }

        //need to be logged in and/or most checks below rely on $member being a Member
        if (!$member) {
            return false;
        }
        // members can usually view their own record
        if ($this->ID == $member->ID) {
            return true;
        }

        //standard check
        return Permission::checkMember($member, 'CMS_ACCESS_SecurityAdmin');
    }
public function canView ( $ member = null ) { //get member if ( ! $ member ) { $ member = Security :: getCurrentUser ( ) ; } //check for extensions, we do this first as they can overrule everything $ extended = $ this -> extendedCan ( __FUNCTION__ , $ member ) ; if ( $ extended !== null ) { return $ extended ; } //need to be logged in and/or most checks below rely on $member being a Member if ( ! $ member ) { return false ; } // members can usually view their own record if ( $ this -> ID == $ member -> ID ) { return true ; } //standard check return Permission :: checkMember ( $ member , 'CMS_ACCESS_SecurityAdmin' ) ; }
Users can view their own record.
Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions.
This is likely to be customized for social sites etc. with a looser permission model.

@param Member $member
@return bool
Users can view their own record . Otherwise they ll need ADMIN or CMS_ACCESS_SecurityAdmin permissions . This is likely to be customized for social sites etc . with a looser permission model .