/// <summary> /// Gets a value indicating whether customer is registered /// </summary> /// <param name="customer">Customer</param> /// <param name="onlyActiveCustomerRoles">A value indicating whether we should look only in active customer roles</param> /// <returns>Result</returns> public static bool IsRegistered(this CustomerModel customer, bool onlyActiveCustomerRoles = true) { return(IsInCustomerRole(customer, NopCustomerDefaults.RegisteredRoleName, onlyActiveCustomerRoles)); }
/// <summary> /// Gets a value indicating whether customer is guest /// </summary> /// <param name="customer">Customer</param> /// <param name="onlyActiveCustomerRoles">A value indicating whether we should look only in active customer roles</param> /// <returns>Result</returns> public static bool IsGuest(this CustomerModel customer, bool onlyActiveCustomerRoles = true) { return(IsInCustomerRole(customer, NopCustomerDefaults.GuestsRoleName, onlyActiveCustomerRoles)); }
/// <summary> /// Gets a value indicating whether customer is a forum moderator /// </summary> /// <param name="customer">Customer</param> /// <param name="onlyActiveCustomerRoles">A value indicating whether we should look only in active customer roles</param> /// <returns>Result</returns> public static bool IsForumModerator(this CustomerModel customer, bool onlyActiveCustomerRoles = true) { return(IsInCustomerRole(customer, NopCustomerDefaults.ForumModeratorsRoleName, onlyActiveCustomerRoles)); }