src/Service/Cdn.php
public function urlAvatarScheme($iUserId = null)
    {
        if (is_null($iUserId)) {
            $iUserId = activeUser('id');
        }

        if (empty($iUserId)) {
            $avatarScheme = $this->urlBlankAvatarScheme();
        } else {
            $oUserModel = Factory::model('User', 'nails/module-auth');
            $user       = $oUserModel->getById($iUserId);
            if (empty($user->profile_img)) {
                $avatarScheme = $this->urlBlankAvatarScheme();
            } else {
                $avatarScheme = $this->urlCropScheme();
            }
        }

        return $avatarScheme;
    }
public function urlAvatarScheme($iUserId = null)
    {
        if (is_null($iUserId)) {
            $iUserId = activeUser('id');
        }

        if (empty($iUserId)) {
            $avatarScheme = $this->urlBlankAvatarScheme();
        } else {
            $oUserModel = Factory::model('User', 'nails/module-auth');
            $user       = $oUserModel->getById($iUserId);
            if (empty($user->profile_img)) {
                $avatarScheme = $this->urlBlankAvatarScheme();
            } else {
                $avatarScheme = $this->urlCropScheme();
            }
        }

        return $avatarScheme;
    }
public function urlAvatarScheme ( $ iUserId = null ) { if ( is_null ( $ iUserId ) ) { $ iUserId = activeUser ( 'id' ) ; } if ( empty ( $ iUserId ) ) { $ avatarScheme = $ this -> urlBlankAvatarScheme ( ) ; } else { $ oUserModel = Factory :: model ( 'User' , 'nails/module-auth' ) ; $ user = $ oUserModel -> getById ( $ iUserId ) ; if ( empty ( $ user -> profile_img ) ) { $ avatarScheme = $ this -> urlBlankAvatarScheme ( ) ; } else { $ avatarScheme = $ this -> urlCropScheme ( ) ; } } return $ avatarScheme ; }
Determines which scheme to use for a user's avatar and returns the appropriate one

@param integer $iUserId The User ID to check

@return string
Determines which scheme to use for a user s avatar and returns the appropriate one